[llvm-bugs] [Bug 39199] New: Segmentation fault with -O2
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 6 02:50:02 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39199
Bug ID: 39199
Summary: Segmentation fault with -O2
Product: new-bugs
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dcb314 at hotmail.com
CC: llvm-bugs at lists.llvm.org
This C code:
int a[ 1];
int b;
void c() {
void *d = b = 0;
for (;; b++)
a[b] = (int) d++;
}
seems to compile ok without optimiser on clang-7:
$ clang -c -w option-5d5829.c
$
but then the optimiser doesn't seem to like it:
$ clang -c -w -O2 option-5d5829.c
Stack dump:
0. Program arguments: /usr/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gn
u -emit-obj -disable-free -disable-llvm-verifier -discard-value-names
-main-file
-name option-5d5829.c -mrelocation-model static -mthread-model posix
-fmath-errn
o -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-c
pu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer
-cov
erage-notes-file /home/dcb/creduce/dcbTest/option-5d5829.gcno -resource-dir
/usr
/lib64/clang/7.0.0 -internal-isystem /usr/local/include -internal-isystem
/usr/l
ib64/clang/7.0.0/include -internal-externc-isystem /include
-internal-externc-is
ystem /usr/include -O2 -w -fdebug-compilation-dir /home/dcb/creduce/dcbTest
-fer
ror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option
-ve
ctorize-loops -vectorize-slp -o option-5d5829.o -x c option-5d5829.c -faddrsig
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'option-5d5829.c'.
4. Running pass 'Loop Pass Manager' on function '@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/20181006/54983107/attachment.html>
More information about the llvm-bugs
mailing list