[LLVMbugs] [Bug 1808] New: CBE generates code that will SIGILL: "ote: if this code is reached, the program will abort"
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Nov 17 07:17:26 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1808
Summary: CBE generates code that will SIGILL: "ote: if this code
is reached, the program will abort"
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=1244)
--> (http://llvm.org/bugs/attachment.cgi?id=1244)
delta reduced testcase
If I compile the attached testcase with CBE, I get a warning from gcc
"<stdin>:320: warning: function called through a non-compatible type
<stdin>:320: note: if this code is reached, the program will abort".
When I run the program I do indeed get a SIGILL, Illegal Instruction.
Looking at the generated assembly file (by gcc), there is a 0x0b0f (which is
ud2a) which causes this.
Generating assembly directly with llvm-gcc works, the problem is only with the
C code generated by llc.
$ llvm-gcc -Wfatal-errors testcase-min.i -O0 -emit-llvm -c -o - |
/home/edwin/llvm-svn/llvm/Release/bin/llc -march=c | gcc -O0 -x c - -S -o - |
grep 0x0b0f
testcase-min.i:16: warning: ‘struct cl_limits’ declared inside parameter
list
testcase-min.i:16: warning: its scope is only this definition or declaration,
which is probably not what you want
testcase-min.i:16: warning: ‘struct cl_engine’ declared inside parameter
list
testcase-min.i:23: warning: ‘struct optstruct’ declared inside parameter
list
testcase-min.i: In function ‘clamav_unpack’:
testcase-min.i:31: warning: incompatible implicit declaration of built-in
function ‘fprintf’
<stdin>:148: warning: conflicting types for built-in function ‘malloc’
<stdin>: In function ‘clamav_unpack’:
<stdin>:320: warning: function called through a non-compatible type
<stdin>:320: note: if this code is reached, the program will abort
.value 0x0b0f
--
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