Testcase: int h(int *); struct a1 { int i[2]; }; void link_error(); int f(struct a1 a, int i,int *c) { int b; void *g = &a.i[i]; *(int*)g = 1; h(&b); if (a.i[i] !=1) link_error(); return b+c[i*2]; }
------- # VUSE <b_19>; # VUSE <SFT.3_20>; # VUSE <SFT.4_21>; D.1996_14 = *D.1995_13; That is very imprecise and actually stays throught the whole compiling. This is a reduced testcase from tramp3d, the void* comes from inlining inplace operator new. -- Summary: may aliasing set is set too large Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: missed-optimization, memory-hog, compile-time-hog Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26609