[Bug optimization/13761] New: [tree-ssa] component refs to the same struct should not alias

dann at godzilla dot ics dot uci dot edu gcc-bugzilla@gcc.gnu.org
Tue Jan 20 07:03:00 GMT 2004


struct s {   int s;  int s2;  char p;  int arr[10];};

int foo0 (struct s * f)
{
  f->s = 1;
  f->s2 = 2;
  if (f->s != 1)
    link_error ();
}

The "if" is not optimized because, presumably, the 2 stores are not considered
not to alias.

The .optimized dump:

foo0 (f)
{
<bb 0>:
  f->s = 1;
  f->s2 = 2;
  if (f->s != 1) goto <L0>; else goto <L1>;

<L0>:;
  link_error ();

<L1>:;
  return;

}

-- 
           Summary: [tree-ssa] component refs to the same struct should not
                    alias
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list