https://bugs.llvm.org/show_bug.cgi?id=40756
Bug ID: 40756
Summary: Compile error(Segmentation fault) occurs when -O2 or
more is set
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Created attachment 21487
--> https://bugs.llvm.org/attachment.cgi?id=21487&action=edit
BUG REPORT(bug499-2a2a42.c, bug499-2a2a42.sh)
When compiling the following program(bug499.c) with -O2 or more, Segmentation
fault occurs and output the following message.
* Tail of error message
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/bug499-2a2a42.c
clang-9: note: diagnostic msg: /tmp/bug499-2a2a42.sh
clang-9: note: diagnostic msg:
* source program (bug499.c)
#include <stdio.h>
int main () {
int i=0,j=0;
int v1=1,v2=2,v3=3;
for(i=0;i<1;i++) {
for(j=0; j<29; ++j) {
v3 = (v1 + v3) *v1;
v1=v2 * v3;
}
v2=1;
}
printf("%d %d %d \n",v1,v2,v3);
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs