For typedef struct { int x; int z; } Foo_t; char *xm; void bar(void); void foo(void) { Foo_t x; x.x = 1; x.z = 2; xm = (char *)&x; bar(); } where we decompose the struct for aliasing, the store to x.z is killed, which is wrong. Testcase is reduced from fortranio_2.f90 test. The fortran frontend does such things for IO. The fortranio_2.f90 failure get's triggered by the array-aliasing patches as it's sturcture contains an array and only with the patches we start decomposing the structure at all.
Confirmed.
Subject: Bug 24117 CVSROOT: /cvs/gcc Module name: gcc Changes by: dberlin@gcc.gnu.org 2005-09-29 19:38:01 Modified files: gcc : ChangeLog tree-ssa-structalias.c Added files: gcc/testsuite/gcc.dg/tree-ssa: pr24117.c Log message: 2005-09-29 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/24117 * tree-ssa-structalias.c (find_func_aliases): Strip nops before considering whether to use anyoffset. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10049&r2=2.10050 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-structalias.c.diff?cvsroot=gcc&r1=2.29&r2=2.30 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr24117.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed