[LLVMbugs] [Bug 14104] New: [microsoft] "Function already has body?" assertion with -cxx-abi microsoft on simple constructor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 16 20:03:32 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14104

             Bug #: 14104
           Summary: [microsoft] "Function already has body?" assertion
                    with -cxx-abi microsoft on simple constructor
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Nicos-MacBook-Pro:delta thakis$ cat repro.ii
class C {
  C();
};
C::C() {}
Nicos-MacBook-Pro:delta thakis$ ~/src/llvm-git/Release+Asserts/bin/clang++ -c
repro.ii -Xclang -cxx-abi -Xclang microsoft 
Assertion failed: (CurFn->isDeclaration() && "Function already has body?"),
function StartFunction, file CodeGenFunction.cpp, line 342.
0  clang             0x00000001112b7f02 PrintStackTrace(void*) + 34
1  clang             0x00000001112b83e9 SignalHandler(int) + 649
2  libsystem_c.dylib 0x00007fff8ef8e8ea _sigtramp + 26
3  libsystem_c.dylib 0x00007fbcca410e78 _sigtramp + 18446743786941326760
4  clang             0x00000001112b8146 abort + 22
5  clang             0x00000001112b8105 __assert_rtn + 53
6  clang             0x000000010fefbbaa
clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl,
clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&,
clang::CodeGen::FunctionArgList const&, clang::SourceLocation) + 2250
7  clang             0x000000010fefc37e
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 478
8  clang             0x000000010fe3b711
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 257
9  clang             0x000000010ff0261e
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 206
10 clang             0x000000010ff03850
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 688
11 clang             0x000000010ff08dd0
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 496
12 clang             0x000000010ff24d7f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 127
13 clang             0x000000010fef94fa
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 170
14 clang             0x000000010ff30e63 clang::ParseAST(clang::Sema&, bool,
bool) + 323
15 clang             0x000000010fef8880 clang::CodeGenAction::ExecuteAction() +
1280
16 clang             0x000000010fd07c0b clang::FrontendAction::Execute() + 107
17 clang             0x000000010fcdd86f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 991
18 clang             0x000000010fca7269
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3401
19 clang             0x000000010fc9da06 cc1_main(char const**, char const**,
char const*, void*) + 2822
20 clang             0x000000010fca3304 main + 708
21 libdyld.dylib     0x00007fff86eac7e1 start + 0
Stack dump:
0.    Program arguments: /Users/thakis/src/llvm-git/Release+Asserts/bin/clang
-cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free
-main-file-name repro.ii -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 134.9 -coverage-file
/Users/thakis/src/delta/repro.o -resource-dir
/Users/thakis/src/llvm-git/Release+Asserts/bin/../lib/clang/3.2
-fdeprecated-macro -fdebug-compilation-dir /Users/thakis/src/delta
-ferror-limit 19 -fmessage-length 187 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -cxx-abi microsoft -o repro.o -x
c++-cpp-output repro.ii 
1.    <eof> parser at end of file
2.    repro.ii:4:4: LLVM IR generation of declaration 'C::C'
3.    repro.ii:4:4: Generating code for declaration 'C::C'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (http://llvm.org/git/clang.git
4b70070dc58e81980239ef2e9bcecef1210ae147) (http://llvm.org/git/llvm.git
12d57c0b853867fe487b2d094691e97733d30358)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list