rajesh viswabramana
2012-Dec-19 13:24 UTC
[LLVMdev] Function inline causes crash in clang for .ast to .s
Hi, Clang crashes when tried to compile from .ast to .s for below sample code, inline-test.c ** *extern inline int func1 (void) { return 0; } inline int func1 (void) { return 1; }* clang *works fine* for .c -> .s, *>clang inline-test.c -std=c99 -fgnu89-inline -S -o inline-test.s * But *crashes* when tried to generate .s from .ast for same file, *>clang inline-test.c -std=c99 -fgnu89-inline -emit-ast -o inline-test.ast* *>clang inline-test.ast -std=c99 -fgnu89-inline -S -o inline-test.s* clang-3.2: $HOME/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:342: void clang::CodeGen::CodeGenFunction::*StartFunction*(clang::GlobalDecl, clang::QualType, llvm::Function*, const clang::CodeGen::CGFunctionInfo&, const clang::CodeGen::FunctionArgList&, clang::SourceLocation): Assertion `*CurFn->isDeclaration() && "Function already has body?"*' failed.>From crash message it seems Codegen is already emitted for inline function.Crash occurs only if tried to generate assembly out of ast file. Regards, Rajesh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121219/d2e79353/attachment.html>
rajesh viswabramana
2012-Dec-28 12:21 UTC
[LLVMdev] Function inline causes crash in clang for .ast to .s
Hi, Could anyone please comment on this ? Regards, Rajesh On Wed, Dec 19, 2012 at 6:54 PM, rajesh viswabramana < viswabramana.rajesh at gmail.com> wrote:> Hi, > > Clang crashes when tried to compile from .ast to .s for below sample code, > > inline-test.c > ** > *extern inline int func1 (void) { return 0; } > inline int func1 (void) { return 1; }* > > clang *works fine* for .c -> .s, > *>clang inline-test.c -std=c99 -fgnu89-inline -S -o inline-test.s * > > But *crashes* when tried to generate .s from .ast for same file, > *>clang inline-test.c -std=c99 -fgnu89-inline -emit-ast -o inline-test.ast > * > *>clang inline-test.ast -std=c99 -fgnu89-inline -S -o inline-test.s* > > clang-3.2: $HOME/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:342: > void clang::CodeGen::CodeGenFunction::*StartFunction*(clang::GlobalDecl, > clang::QualType, llvm::Function*, const clang::CodeGen::CGFunctionInfo&, > const clang::CodeGen::FunctionArgList&, clang::SourceLocation): Assertion ` > *CurFn->isDeclaration() && "Function already has body?"*' failed. > > From crash message it seems Codegen is already emitted for inline function. > > Crash occurs only if tried to generate assembly out of ast file. > > > Regards, > Rajesh > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121228/539cac03/attachment.html>
Meador Inge
2013-Jan-02 20:24 UTC
[LLVMdev] Function inline causes crash in clang for .ast to .s
On 12/28/2012 06:21 AM, rajesh viswabramana wrote:> Hi, > > Could anyone please comment on this ?For crashes you should open a bug report instead of mailing one of the dev lists: http://llvm.org/bugs/. There is some more information on filing bug reports here: http://llvm.org/docs/HowToSubmitABug.html. (Also, in the future questions related to Clang should go to cfe-dev). -- Meador Inge CodeSourcery / Mentor Embedded
Apparently Analagous Threads
- [LLVMdev] Function inline causes crash in clang for .ast to .s
- [LLVMdev] Extended Inline asm with double data type crashes clang
- [LLVMdev] Extended Inline asm with double data type crashes clang
- [LLVMdev] Extended Inline asm with double data type crashes clang
- [LLVMdev] Extended Inline asm with double data type crashes clang