[LLVMbugs] [Bug 16637] New: testcase causes ICE from the "Global Variable Optimizer" pass
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 16 14:30:47 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16637
Bug ID: 16637
Summary: testcase causes ICE from the "Global Variable
Optimizer" pass
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: su at cs.ucdavis.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following testcase causes the current clang trunk and clang 3.3 to give an
ICE on x86_64-pc-linux-gnu at -O1 and above in 64-bit mode. This is a
regression from 3.2.
$ clang-trunk -v
clang version 3.4 (trunk 186424)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ clang-trunk -O1 small.c
small.c:16:19: warning: incompatible pointer types initializing 'char *' with
an expression of type 'int *'
[-Wincompatible-pointer-types]
char *c[] = { 0, &b.f1, 0, &b.f0, 0 };
^~~~~
small.c:16:29: warning: incompatible pointer types initializing 'char *' with
an expression of type 'int *'
[-Wincompatible-pointer-types]
char *c[] = { 0, &b.f1, 0, &b.f0, 0 };
^~~~~
small.c:14:10: warning: expression result unused [-Wunused-value]
for (a; a;)
^
0 clang 0x0000000001be4bb5 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1 clang 0x0000000001be5003
2 libpthread.so.0 0x00007f22e9c57cb0
Stack dump:
0. Program arguments: /usr/local/clang-trunk/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-main-file-name small.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -resource-dir
/usr/local/clang-trunk/bin/../lib/clang/3.4 -internal-isystem
/usr/local/include -internal-isystem
/usr/local/clang-trunk/bin/../lib/clang/3.4/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O1 -fdebug-compilation-dir
/home/su/lookat/ice0716 -ferror-limit 19 -fmessage-length 114 -mstackrealign
-fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -o
/tmp/small-b1acf5.o -x c small.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Global Variable Optimizer' on module 'small.c'.
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 186424)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/small-2cd2ca.c
clang: note: diagnostic msg: /tmp/small-2cd2ca.sh
clang: note: diagnostic msg:
********************
$ cat small-2cd2ca.c
# 1 "small.c" 1
struct S
{
int f0;
int f1;
};
int a;
static struct S b;
int main ()
{
for (;;)
for (a; a;)
{
char *c[] = { 0, &b.f1, 0, &b.f0, 0 };
}
}
$ cat small-2cd2ca.sh
/usr/local/clang-trunk/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj
-disable-free -disable-llvm-verifier -main-file-name small.c -mrelocation-model
static -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -O1
-ferror-limit 19 -fmessage-length 114 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -x c small-2cd2ca.c
--
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/20130716/9f683558/attachment.html>
More information about the llvm-bugs
mailing list