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 optimization/13758] New: [tree-ssa] consecutive stores to the same array element not removed


int foo (int * arr)
{
  arr[0] = 1;
  arr[0] = 2;
}

the .optimized dump when compiling with -O2 is: 

foo (arr)
{
<bb 0>:
  *arr = 1; /* This should be eliminated*/
  *arr = 2;
  return;
}

-- 
           Summary: [tree-ssa] consecutive stores to the same array element
                    not removed
           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=13758


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