https://bugs.llvm.org/show_bug.cgi?id=35266
Bug ID: 35266
Summary: clang crashes in 'Codegen Prepare' with '-c -O2'
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: sunil_srivast...@playstation.sony.com
CC: llvm-bugs@lists.llvm.org
Created attachment 19394
--> https://bugs.llvm.org/attachment.cgi?id=19394&action=edit
C++ Source
clang, crashes in 'Codegen Prepare' with '-c -O2'. The reproduction here is on
x86_64-unknown-gnu r314794, but was originally found with x86_64-scei-ps4.
The crash started since r314794, but exists in current trunk as well.
Attaching dump info. Source is:
int bar(int v);
struct T {
unsigned char f;
};
struct U {
unsigned long q;
struct T *d;
};
struct H {
struct U *p;
};
struct S {
union {
unsigned long fc;
struct {
int i;
int j;
} a;
struct {
int i;
int j;
} b;
} u;
};
void foo(struct H *h, struct S *s) {
struct U *u;
u = h->p;
int m = 0;
if (u->d) {
if (s)
m = s->u.a.j;
}
m = bar(m);
if (u->d) {
s->u.a.j = m;
s->u.a.i = 0x01;
} else {
s->u.b.j = m;
s->u.b.i = 0x01;
}
u->d->f = 0x10;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs