-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler crash with vibe.d project #1022
Comments
Which ldc version do you use? (Output of |
oh - hadn't thought system used beta. sorry for not noticing. I can
|
Confirmed. Happens with version from master, too. |
I am trying to check this with ldc2 0.16.0-alpha4 but I get a compile error:
|
You will need to copy and paste chunkBy from Phobos since it isn't yet in the library for LDC, I think. That should have been included in my commit (along with version(LDC) which calls that code rather than Phobos if dmd is not used). |
Using ldc alpha 3 and git head for mood. I think it's alpha 3 and misreporting its version as 0.15.1, but I could be wrong. Fast-forward |
upgraded to ldc alpha 4. I also put in the align(16) for atomicStore and used vibe master as release notes suggest. not sure if I did it right. still compiler crash: [laeeth@engine mood]$ dub build --compiler=ldc2 |
After the library update I get the error again. |
This is somewhat complicated to reduce. My current command line is:
The problem is related to initialization of |
Sorry for my ignorance, but what does 'the initializer has no type' Laeeth.
|
It's rather certainly a frontend bug, where it either does not run semantic analysis on the variable or does not fully resolve the type. It's not expected to occur in normal operation, and as such the error message does not make much sense. |
Thanks for the colour. |
Btw the code compiled with dmd often crashes, although dicebot cannot replicate. My guess is something to do with the atomic operations on the cache. |
Do you properly align the data used with atomic operations? |
It's his code, not mine. (I started writing my own fork to do things a bit more simply, as I don't really need the sophistication/efficiency, and it's pushing at boundaries of my knowledge at this stage - my last low level work was Z80 embedded). But I tried putting an align(16) before the relevant struct and it didn't seem to help.. |
Should be fixed by #1891. |
Closing this as part of housekeeping, looks very much like a dead end. |
Hi.
I am afraid I haven't time to minimize this or to check it compiles under dmd 2.066. It does compile under GDC 5.2.0 however. I am using 64 bit arch linux and:
DUB version 0.9.24-rc.1, built on Jun 28 2015
Project is dicebot's refinement of the vibe.d blog framework. I just modified it to compile with ldc - a few changes to imports, and stuck in the source from phobos for lineSplitter and chunkBy. Possibly I have done something stupid, but I suppose it shouldn't be a compiler crash (and it does compile under gdc).
This commit:
Laeeth/mood@6d4a0cf
Error:
[laeeth@engine mood]$ dub build --compiler=ldc
Target vibe-d 0.7.24 is up to date. Use --force to rebuild.
Building mood 1.0.0+commit.7.g6d4a0cf configuration "application", build type debug.
Running ldc...
Compiling diet template 'pages/new_post.dt'...
Compiling diet template 'pages/index.dt'...
Compiling diet template 'pages/single_post.dt'...
0 ldc 0x00000000012335f2 llvm::sys::PrintStackTrace(IO_FILE) + 34
1 ldc 0x00000000012316a3
2 libpthread.so.0 0x00007f55099a0d60
3 ldc 0x00000000006ea97f
4 ldc 0x00000000006eb6e3 IrAggr::addFieldInitializers(llvm::SmallVectorImplllvm::Constant_&, std::map<VarDeclaration*, llvm::Constant*, std::less<VarDeclaration*>, std::allocator<std::pair<VarDeclaration* const, llvm::Constant*> > > const&, AggregateDeclaration_, unsigned int&, bool) + 707
5 ldc 0x00000000006ebc74 IrAggr::createInitializerConstant(std::map<VarDeclaration_, llvm::Constant_, std::less<VarDeclaration_>, std::allocator<std::pair<VarDeclaration* const, llvm::Constant*> > > const&, llvm::StructType_) + 164
6 ldc 0x00000000006ec0c7 IrAggr::getDefaultInit() + 119
7 ldc 0x0000000000732ba8
8 ldc 0x0000000000732f33
9 ldc 0x0000000000732b83
10 ldc 0x000000000073373e Declaration_codegen(Dsymbol_) + 46
11 ldc 0x00000000006c5b19 codegenModule(IRState_, Module_, bool) + 137
12 ldc 0x000000000059b631 ldc::CodeGenerator::emit(Module*) + 177
13 ldc 0x000000000057690b main + 10395
14 libc.so.6 0x00007f5508b72610 __libc_start_main + 240
15 ldc 0x0000000000594365
FAIL .dub/build/application-debug-linux.posix-x86_64-ldc_0-C05D3549AE4AB8B05B0DC5D87C3AB16A/ mood executable
Error executing command build:
ldc failed with exit code -11.
The text was updated successfully, but these errors were encountered: