[LLVMbugs] [Bug 3481] New: clang miscompiles MultiSource/Benchmarks/Prolangs-C/cdecl
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Feb 4 19:18:32 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3481
Summary: clang miscompiles MultiSource/Benchmarks/Prolangs-
C/cdecl
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: daniel at zuster.org
CC: llvmbugs at cs.uiuc.edu
The assembler warnings are suspicious, and the executable crashes on the test
input:
--
ddunbar at frank:cdecl$ CCC_ADD_ARGS=-ccc-echo make LLVMGXX=false LLVMGCC="$(which
xcc) -std=gnu89 -m32" TEST=nightly DISABLE_CBE=1 DISABLE_JIT=1 report
make -j1 TEST=nightly 2>&1 | tee report.nightly.raw.out
make[1]: Entering directory
`/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl'
Compiling cdecl.c to Output/cdecl.bc
xcc: Unknown host 'linux', using generic host information.
clang -emit-llvm-bc --disable-fp-elim --nozero-initialized-in-bss -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -DNDEBUG -D__NO_MATH_INLINES
-I/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl
-I/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl
-I/home/ddunbar/llvm/include -I/home/ddunbar/llvm/projects/test-suite/include
-I../../../../include -I/home/ddunbar/llvm/include -O0 -std=gnu89 -o
Output/cdecl.bc -x c cdecl.c
cdecl.c:564:20: warning: format string is not a string literal (potentially
insecure)
(void) printf(fmt, p->cpptext);
^~~
cdecl.c:566:20: warning: format string is not a string literal (potentially
insecure)
(void) printf(fmt, p->text);
^~~
2 diagnostics generated.
/home/ddunbar/llvm/Debug/bin/llvm-ld -link-as-library -disable-opt
Output/cdecl.bc -o Output/cdecl.linked.rbc
/home/ddunbar/llvm/Debug/bin/opt -std-compile-opts
-info-output-file=/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/Output/cdecl.linked.bc.info
-stats -time-passes Output/cdecl.linked.rbc -o Output/cdecl.linked.bc -f
/home/ddunbar/llvm/Debug/bin/llvm-ld
-L/data/public/llvm/llvm-gcc4.2-2.2-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1
-L/data/public/llvm/llvm-gcc4.2-2.2-x86-linux-RHEL4/bin/../lib
-info-output-file=/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/Output/cdecl.llvm.bc.info
-stats -time-passes Output/cdecl.linked.bc \
-lc -o Output/cdecl.llvm
gcc
-I/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl
-I/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl
-I/home/ddunbar/llvm/include -I/home/ddunbar/llvm/projects/test-suite/include
-I../../../../include -I/home/ddunbar/llvm/include -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -DNDEBUG -D__NO_MATH_INLINES -O3 -c cdecl.c -o
Output/cdecl.o
g++ -o Output/cdecl.native Output/cdecl.o
/home/ddunbar/llvm/projects/test-suite/RunSafely.sh 500 0
/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/testset
Output/cdecl.out-nat Output/cdecl.native
ulimit -t 500; ulimit -c unlimited; ulimit -f 10485760; ulimit -v 300000; time
-p sh -c 'Output/cdecl.native >Output/cdecl.out-nat 2>&1 <
/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/testset;
echo exit $?'
grep "^program" Output/cdecl.out-nat.time >>
Output/cdecl.nightly.nat.report.txt
/home/ddunbar/llvm/Debug/bin/llc -f Output/cdecl.llvm.bc -o Output/cdecl.llc.s
gcc Output/cdecl.llc.s -o Output/cdecl.llc -lm
Output/cdecl.llc.s: Assembler messages:
Output/cdecl.llc.s:6692: Warning: right operand is a bignum; integer 0 assumed
Output/cdecl.llc.s:6695: Warning: right operand is a bignum; integer 0 assumed
Output/cdecl.llc.s:6707: Warning: right operand is a bignum; integer 0 assumed
Output/cdecl.llc.s:6782: Warning: right operand is a bignum; integer 0 assumed
/home/ddunbar/llvm/projects/test-suite/RunSafely.sh 500 0
/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/testset
Output/cdecl.out-llc Output/cdecl.llc
ulimit -t 500; ulimit -c unlimited; ulimit -f 10485760; ulimit -v 300000; time
-p sh -c 'Output/cdecl.llc >Output/cdecl.out-llc 2>&1 <
/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/testset;
echo exit $?'
TEST Output/cdecl.llc FAILED: process terminated by signal (exit status 139)!
warning: Can't read pathname for load map: Input/output error.
Core was generated by `Output/cdecl.llc'.
Program terminated with signal 11, Segmentation fault.
[New process 17678]
#0 0x400c5c70 in putc () from /lib/i686/cmov/libc.so.6
#0 0x400c5c70 in putc () from /lib/i686/cmov/libc.so.6
#1 0x0804aff8 in yylex ()
#2 0x00000000 in ?? ()
/home/ddunbar/llvm/projects/test-suite/DiffOutput.sh
"/home/ddunbar/llvm/Debug/bin/fpcmp " llc cdecl
******************** TEST (llc) 'cdecl' FAILED! ********************
Execution Context Diff:
/home/ddunbar/llvm/Debug/bin/fpcmp: FP Comparison failed, not a numeric
difference between 'W' and 'e'
******************** TEST (llc) 'cdecl' ****************************
rm -f Output/cdecl.exe-llc
cp Output/cdecl.diff-llc Output/cdecl.exe-llc
cp: cannot stat `Output/cdecl.diff-llc': No such file or directory
make[1]: [Output/cdecl.exe-llc] Error 1 (ignored)
head -n 100 Output/cdecl.exe-llc >> Output/cdecl.nightly.llc.report.txt
head: cannot open `Output/cdecl.exe-llc' for reading: No such file or directory
make[1]: [Output/cdecl.nightly.llc.report.txt] Error 1 (ignored)
cat Output/cdecl.nightly.compile.report.txt Output/cdecl.nightly.nat.report.txt
Output/cdecl.nightly.llc.report.txt > Output/cdecl.nightly.report.txt
---------------------------------------------------------------
>>> ========= '/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl' Program
---------------------------------------------------------------
TEST-PASS: compile
/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl
TEST-RESULT-compile: Total Execution Time: 0.7240 seconds (0.6941 wall clock)
TEST-RESULT-compile: 65872 Output/cdecl.llvm.bc
TEST-RESULT-nat-time: program 0.000000
TEST-FAIL: llc
/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl
make[1]: Leaving directory
`/home/ddunbar/llvm.trunk/projects/test-suite/MultiSource/Benchmarks/Prolangs-C/cdecl'
/home/ddunbar/llvm/projects/test-suite/GenerateReport.pl
/home/ddunbar/llvm/projects/test-suite/TEST.nightly.report <
report.nightly.raw.out > report.nightly.txt
Program | GCCAS Bytecode LLC compile LLC-BETA compile JIT codegen | GCC
CBE LLC LLC-BETA JIT | GCC/CBE GCC/LLC GCC/LLC-BETA LLC/LLC-BETA
cdecl | 0.7240 65872 * * * | 0.00 *
* * * | n/a n/a n/a n/a
--
--
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