[LLVMbugs] [Bug 18031] New: Assertion failed: (CurFn->isDeclaration() && "Function already has body?"), function StartFunction, file CodeGenFunction.cpp, line 500.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 22 06:27:56 PST 2013


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

            Bug ID: 18031
           Summary: Assertion failed: (CurFn->isDeclaration() && "Function
                    already has body?"), function StartFunction, file
                    CodeGenFunction.cpp, line 500.
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ddkilzer at kilzer.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Reduced test case:

typedef struct mystruct { } *mystruct_t;
class MyClass {
 static const MyClass* create(mystruct_t q);
};
const MyClass* MyClass::create(mystruct_t q) { return 0; }
extern "C" {
 const MyClass* _ZN7MyClass6createEP8mystruct(mystruct_t q) { return 0; }
}

Original arguments used to reproduce (on Mac OS X 10.9) with trunk clang
r194422:

./clang-r194422/bin/clang -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj
-disable-free -main-file-name x.cpp -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 142 -gdwarf-2 -stdlib=libc++ -Os -Wno-trigraphs
-Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type
-Wno-implicit-atomic-properties -Wno-receiver-is-weak
-Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual
-Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch
-Wno-unused-function -Wno-unused-label -Wno-unused-parameter
-Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized
-Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion
-Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion
-Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-selector
-Wno-strict-selector-match -Wno-undeclared-selector
-Wno-deprecated-implementations -Wno-c++11-extensions -Wprotocol
-Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Wmost
-Wpointer-arith -Wcast-align -Wno-error=deprecated-declarations
-fdeprecated-macro -ferror-limit 19 -fmacro-backtrace-limit 0 -fmessage-length
0 -fvisibility-inlines-hidden -stack-protector 1 -mstackrealign -fblocks
-fno-rtti -fno-threadsafe-statics -fobjc-runtime=macosx-10.9.0
-fencode-extended-block-signature -fobjc-gc -fobjc-exceptions -fexceptions
-fpascal-strings -fno-common -fdiagnostics-show-option
-fdiagnostics-show-note-include-stack -fasm-blocks -vectorize-loops
-vectorize-slp -x c++ x.cpp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131122/ed8871f9/attachment.html>


More information about the llvm-bugs mailing list