Repository: ldc-developers/ldc

Issue #1698: ICE: function not fully analyzed; previous unreported errors compiling std.variant.VariantN!(16LU, int, string).VariantN.__xopEquals?
Created: 2016-08-16T14:54:41Z
This is a "spinoff" of issue #1696
I am split-compiling a project. After fixing a lot of issues in the form of:
error: module utils from file /path/to/project/source/mod/utils.d conflicts with another module utils from file source/mod/utils.d
I "fixed" them by manually defining module for those projects. This smells like another bug, since there was no actual conflict - the paths are the same, the only exception is that one is absolute and the other one is relative.
After resolving these issues, LDC now runs into an ICE when compiling the project:
ldc2  '-Iasgen@exe' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src/' '-I/usr/include/d/mustache-d/src/' '-w' '-g'  -of 'asgen@exe/source_engine.d.o' -c ../source/engine.d
Error: Internal Compiler Error: function not fully analyzed; previous unreported errors compiling std.variant.VariantN!(16LU, int, string).VariantN.__xopEquals?

Any idea what could be wrong here? Can I get LDC to show the "unreported errors" somehow?

Duplicate issue #1360: "errors compiling function …" -> ICE on invalid code accepted by DMD
Created: 2016-03-18T07:01:13Z
LDC - the LLVM D compiler (04c6c4):
based on DMD v2.068.2 and LLVM 3.7.0
Default target: x86_64-apple-darwin15.3.0
Host CPU: haswell
Error: errors compiling function std.typecons.Tuple!(string, ulong, string).Tuple.__xopCmp
/Users/timothee/usr/local/include/d/std/typecons.d(754): Error: errors compiling function std.typecons.Tuple!(string, ulong, string).Tuple.toHash
Assertion failed: (decl->ir.irFunc != NULL), function getIrFunc, file /Users/timothee/git_clone/D/ldc/ir/irfunction.cpp, line 442.
0  ldc2                     0x000000010dccd50b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57
1  ldc2                     0x000000010dccdbcd SignalHandler(int) + 232
2  libsystem_platform.dylib 0x00007fff98712eaa _sigtramp + 26
3  ldc2                     0x000000010e14ee31 llvm::hashing::detail::fixed_seed_override + 74961
4  ldc2                     0x000000010dccda4d abort + 22
5  ldc2                     0x000000010dccda37 abort + 0
6  ldc2                     0x000000010d2dde1b getIrFunc(FuncDeclaration*, bool) + 603
7  ldc2                     0x000000010d2aa92b RTTIBuilder::push_funcptr(FuncDeclaration*, Type*) + 43
8  ldc2                     0x000000010d2d2a87 LLVMDefineVisitor::visit(TypeInfoStructDeclaration*) + 599
9  ldc2                     0x000000010d2d248c TypeInfoDeclaration_codegen(TypeInfoDeclaration*, IRState*) + 812
10 ldc2                     0x000000010d280456 CodegenVisitor::visit(TypeInfoDeclaration*) + 70
11 ldc2                     0x000000010d27edd2 Declaration_codegen(Dsymbol*) + 50
12 ldc2                     0x000000010d2948b6 codegenModule(IRState*, Module*, bool) + 2102
13 ldc2                     0x000000010d118aab ldc::CodeGenerator::emit(Module*) + 219
14 ldc2                     0x000000010d12587a main + 5914
15 libdyld.dylib            0x00007fff8f4795ad start + 1
16 libdyld.dylib            0x000000000000000d start + 1891134049

I can provide a full example if needed

Closing comment (2016-08-20T21:01:53Z): Turns out this is a duplicate of #1698. Compiles fine with #1709.