public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/13765] [tree-ssa] stores to different members of the same array should not alias
Date: Mon, 12 Jul 2004 21:40:00 -0000	[thread overview]
Message-ID: <20040712214048.24503.qmail@sourceware.org> (raw)
In-Reply-To: <20040120073544.13765.dann@godzilla.ics.uci.edu>


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2004-07-12 21:40 -------
Another testcase for whoever is going to fix this:

struct st
{
  int *arr;
  int c;
  int d;
  int fl;
};

void foo (struct st *s, int a, int b, int c, int d)
{
  *(s->arr) = a; s->arr++;
  *(s->arr) = b; s->arr++;
  *(s->arr) = c; s->arr++;
}

void foo2 (struct st *s, int a, int b, int c, int d)
{
  int *p = s->arr;
  *(p) = a; p++;
  *(p) = b; p++;
  *(p) = c; p++;
  s->arr = p;
}

The 2 functions above are compiled to the same assembly code by gcc-3.4 -O2, 
the .vars dump for them should be very similar too. It is not so currently. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[tree-ssa] stores to        |[tree-ssa] stores to
                   |different members of the    |different members of the
                   |same pointer should not     |same array should not alias
                   |alias                       |


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


  parent reply	other threads:[~2004-07-12 21:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-20  7:35 [Bug optimization/13765] New: " 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 ` dann at godzilla dot ics dot uci dot edu [this message]
2004-07-13  0:08 ` [Bug tree-optimization/13765] [tree-ssa] stores to different members of the same array " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040712214048.24503.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).