This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/24117] New: [4.1 Regression] DCE kills call-clobbered part of structure


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.

-- 
           Summary: [4.1 Regression] DCE kills call-clobbered part of
                    structure
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code, alias
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24117


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]