Bug 24117 - [4.1 Regression] struct is not marked fully as call clobbered
Summary: [4.1 Regression] struct is not marked fully as call clobbered
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: alias, wrong-code
Depends on:
Blocks:
 
Reported: 2005-09-29 10:03 UTC by Richard Biener
Modified: 2005-09-29 19:39 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-29 13:29:05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2005-09-29 10:03:42 UTC
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.
Comment 1 Andrew Pinski 2005-09-29 13:29:05 UTC
Confirmed.
Comment 2 CVS Commits 2005-09-29 19:38:15 UTC
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

Comment 3 Daniel Berlin 2005-09-29 19:39:19 UTC
Fixed