Compile with "-O2 -fno-strict-aliasing", fails on amd64 and alpha at least. Doesn't fail with -fno-tree-vrp. Seems to be related to bug 32575. Breaks linux kernel in many places (this asm is used with prefetch instruction).
struct T { void *p; } *t; int main (void) { struct T *a; a = t; asm volatile ("" : : "m" (*(unsigned long *) a)); if (a) __builtin_abort (); return 0; } -- Summary: [4.2/4.3 Regression] -fno-strict-aliasing -ftree-vrp miscompilation Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: belyshev at depni dot sinp dot msu dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33294