public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/13765] New:  [tree-ssa] stores to different members of the same array should not alias
@ 2004-01-20  7:35 dann at godzilla dot ics dot uci dot edu
  2004-01-20 15:20 ` [Bug optimization/13765] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-01-20  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

The .optimized dump:

foo (arr)
{
<bb 0>:
  *arr = 1;
  *(arr + 4B) = 2;
  if (*arr != 1) goto <L0>; else goto <L1>;

<L0>:;
  abort ();

<L1>:;
  return;

}

-- 
           Summary:  [tree-ssa] stores to different members of the same
                    array 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=13765


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-28 21:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-20  7:35 [Bug optimization/13765] New: [tree-ssa] stores to different members of the same array should not alias dann at godzilla dot ics dot uci dot edu
2004-01-20 15:20 ` [Bug optimization/13765] " pinskia at gcc dot gnu dot org
2004-01-21 20:19 ` pinskia at gcc dot gnu dot org
2004-05-26 18:21 ` [Bug tree-optimization/13765] [tree-ssa] stores to different members of the same pointer " pinskia at gcc dot gnu dot org
2004-07-05 18:58 ` giovannibajo at libero dot it
2004-07-12 21:40 ` [Bug tree-optimization/13765] [tree-ssa] stores to different members of the same array " dann at godzilla dot ics dot uci dot edu
2004-07-13  0:08 ` dnovillo at redhat dot com
2004-10-28 20:31 ` dnovillo at gcc dot gnu dot org
2004-10-28 20:34 ` dnovillo at gcc dot gnu dot org
2004-10-28 21:58 ` dberlin at dberlin dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).