[LLVMbugs] [Bug 6805] New: -fcatch-undefined-behavior crashes with signal 6, "LLVM IR generation of compound statement"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 8 08:31:36 PDT 2010


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

           Summary: -fcatch-undefined-behavior crashes with signal 6,
                    "LLVM IR generation of compound statement"
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: magnus.reftel at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=4657)
 --> (http://llvm.org/bugs/attachment.cgi?id=4657)
Minimized test case

I have a small test case (attached) that fails with the below error message
when building with -fcatch-undefined-behavior, but succeeds without it. I'm
using revision 100754 on cygwin.

/opt/llvm-r100754/bin/clang  -fcatch-undefined-behavior -v -c testcase.c     
clang version 1.5 (trunk 100754)
Target: i386-pc-cygwin
Thread model: posix
 "/opt/llvm-r100754/bin/clang" -cc1 -triple i386-pc-cygwin -S -disable-free
-main-file-name testcase.c -mrelocation-model static -mdisable-fp-elim
-mconstructor-aliases -target-cpu pentium4 -v -resource-dir
/opt/llvm-r100754/lib/clang/1.5 -ferror-limit 19 -fmessage-length 80
-fcatch-undefined-behavior -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o /c/DOCUME~1/qrefmag/LOCALS~1/Temp/cc-T9hI02.s -x c
testcase.c
clang -cc1 version 1.5 based upon llvm 2.8svn hosted on i386-pc-cygwin
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/llvm-r100754/lib/clang/1.5/include
 /usr/include
End of search list.
assertion "(i >= FTy->getNumParams() || FTy->getParamType(i) ==
Params[i]->getType()) && "Calling a function with a bad signature!"" failed:
file "Instructions.cpp", line 324, function: void
llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int)
Stack dump:
0.      Program arguments: /opt/llvm-r100754/bin/clang -cc1 -triple
i386-pc-cygwin -S -disable-free -main-file-name testcase.c -mrelocation-model
static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -v
-resource-dir /opt/llvm-r100754/lib/clang/1.5 -ferror-limit 19 -fmessage-length
80 -fcatch-undefined-behavior -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o /c/DOCUME~1/qrefmag/LOCALS~1/Temp/cc-T9hI02.s -x c
testcase.c
1.      <eof> parser at end of file
2.      testcase.c:6:6: LLVM IR generation of declaration 'foo'
3.      testcase.c:6:6: Generating code for declaration 'foo'
4.      testcase.c:7:1: LLVM IR generation of compound statement ('{}')
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)

-- 
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