public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
Date: Fri, 09 Jul 2010 13:05:00 -0000	[thread overview]
Message-ID: <20100709130513.5940.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44885-226@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from ebotcazou at gcc dot gnu dot org  2010-07-09 13:05 -------
> Can you elaborate?  The relevant type for the MEM_REF is always that of the
> base object, which is either a dereference (thus, of sth addressable) or
> a decl (which can't be non-aliased as well, no?).

In 144t.optimized there is:

  aliasing3_pkg__pointer.18_1->a[1]{lb: 1 sz: 4} = 5;
  D.2290_6 = MEM[(integer *)&aliasing3_pkg__block].a[1]{lb: 1 sz: 4};

and the type (integer *) is wrong.  But you're right, it's probably wrong
before since there is in 014t.veclower:

  aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer;
  aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5;
  aliasing3_pkg.test (&aliasing3_pkg__block.a);

and in 022t.cleanup_cfg:

  aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer;
  aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5;
  aliasing3_pkg.test.isra (&aliasing3_pkg__block.a[1]{lb: 1 sz: 4});

So it looks like IPA-SRA breaks TYPE_NONALIASED_COMPONENT here because it takes
the address of a non-aliased component.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |tree-optimization


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


  parent reply	other threads:[~2010-07-09 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 10:41 [Bug middle-end/44885] New: " ebotcazou at gcc dot gnu dot org
2010-07-09 11:42 ` [Bug middle-end/44885] " rguenth at gcc dot gnu dot org
2010-07-09 13:05 ` ebotcazou at gcc dot gnu dot org [this message]
2010-07-09 13:23 ` [Bug tree-optimization/44885] " rguenth at gcc dot gnu dot org
2010-07-09 13:28 ` rguenth at gcc dot gnu dot org
2010-07-09 15:59 ` ebotcazou at gcc dot gnu dot org
2010-07-09 16:01 ` rguenther at suse dot de
2010-07-09 16:15 ` ebotcazou at gcc dot gnu dot org
2010-07-28  8:17 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:03 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:04 ` ebotcazou at gcc dot gnu 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=20100709130513.5940.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).