/Users/jweinberg/Development/AnonUnion/AnonUnion/TestClass.cpp:13:11: LLVM IR generation of declaration 'Test'
/Users/jweinberg/Development/AnonUnion/AnonUnion/TestClass.cpp:15:16: Generating code for declaration 'Test::TestClass::TestClass'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation)
Compiler version is
Apple clang version 3.0 (tags/Apple/clang-211.9) (based on LLVM 3.0svn)
Extended Description
Naming the struct resolves the issue, but there shouldn't be an issue with the anon struct.
Compiler output: 0 clang 0x00000001085bc212 _ZL15PrintStackTracePv + 34 1 clang 0x00000001085bc6e9 _ZL13SignalHandleri + 633 2 libsystem_c.dylib 0x00007fff8b694cfa _sigtramp + 26 3 libsystem_c.dylib 0x0000000008c19250 _sigtramp + 18446603338324133232 4 clang 0x0000000107a8db5a llvm::GetElementPtrInst::GetElementPtrInst<llvm::Value*>(llvm::Value, llvm::Value, llvm::Value, unsigned int, llvm::Twine const&, llvm::Instruction) + 202 5 clang 0x0000000107e6dad9 llvm::IRBuilder<false, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter >::CreateConstInBoundsGEP2_32(llvm::Value , unsigned int, unsigned int, llvm::Twine const&) + 185
6 clang 0x0000000107a8d7bc clang::CodeGen::CodeGenFunction::EmitLValueForField(llvm::Value, clang::FieldDecl const, unsigned int) + 492
7 clang 0x0000000107ce3045 clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(llvm::Value, clang::FieldDecl const, unsigned int) + 85
8 clang 0x0000000107cde5fa clang::CodeGen::CodeGenFunction::EmitCtorPrologue(clang::CXXConstructorDecl const, clang::CXXCtorType, clang::CodeGen::FunctionArgList&) + 1322
9 clang 0x0000000107cddd14 clang::CodeGen::CodeGenFunction::EmitConstructorBody(clang::CodeGen::FunctionArgList&) + 340
10 clang 0x0000000107e5fe83 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function, clang::CodeGen::CGFunctionInfo const&) + 675
11 clang 0x0000000107cddb83 clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl const, clang::CXXCtorType) + 243
12 clang 0x0000000107e618ed clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 285
13 clang 0x0000000107e6234d clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 605
14 clang 0x00000001078490f7 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl) + 311
15 clang 0x00000001078490bb clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl) + 251
16 clang 0x0000000107848f9f (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 95
17 clang 0x0000000107848f11 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 161
18 clang 0x000000010781cff2 clang::ParseAST(clang::Sema&, bool) + 290
19 clang 0x000000010781baaf clang::CodeGenAction::ExecuteAction() + 671
20 clang 0x000000010780789b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 875
21 clang 0x0000000107805918 clang::ExecuteCompilerInvocation(clang::CompilerInstance) + 2696
22 clang 0x00000001077fa115 cc1_main(char const, char const, char const, void) + 5333
23 clang 0x00000001077dd27b main + 667
24 clang 0x00000001077dcfd4 start + 52
25 clang 0x0000000000000052 start + 18446744069288898738
Stack dump:
Compiler version is Apple clang version 3.0 (tags/Apple/clang-211.9) (based on LLVM 3.0svn)