public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/51782] -ftree-sra: Missing address-space information leads to wrong
Date: Mon, 20 Feb 2012 20:15:00 -0000	[thread overview]
Message-ID: <bug-51782-4-mA5lBGVHfu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51782-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #21 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-20 19:44:46 UTC ---
On Mon, 20 Feb 2012, jamborm at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51782
> 
> --- Comment #20 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-02-20 17:27:36 UTC ---
> (In reply to comment #19)
> > base returned from get_base_address should never be NULL, so it's
> > safe to assume it isn't.  Otherwise the patch looks ok to me.
> > 
> 
> Unfortunately, when I was bootstrapping a modified patch without the
> NULL test on x86_64, it segfaulted.  The reason is that
> expand_debug_expr calls set_mem_attributes_minus_bitpos and in t
> passes
> 
> MEM[(struct basic_stringbuf *)&__s._M_stringbuf]._M_string

That's an invalid MEM_REF, and the result of 
set_mem_attributes_minus_bitpos is probably completely bogus.

> which might be OK for debug statements, I don't really know.  Even
> though I guess it might wreck havoc in address spaces in debug info,
> for now I'm reverting to the original patch from comment #17 for the
> purposes of this PR.

Ok, probably safer for 4.7

> Perhaps get_base_address misses a DECL_P in the condition looking into
> MEM_REFs?

No, sure not - in the above we have a component-ref inside the
ADDR_EXPR.

Richard.


  parent reply	other threads:[~2012-02-20 19:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 12:03 [Bug tree-optimization/51782] New: Missing address-space information leads to wrong code gjl at gcc dot gnu.org
2012-01-07 12:04 ` [Bug tree-optimization/51782] " gjl at gcc dot gnu.org
2012-01-07 12:06 ` gjl at gcc dot gnu.org
2012-01-07 12:08 ` gjl at gcc dot gnu.org
2012-01-07 12:10 ` gjl at gcc dot gnu.org
2012-01-07 12:11 ` gjl at gcc dot gnu.org
2012-01-07 12:12 ` gjl at gcc dot gnu.org
2012-01-07 12:17 ` gjl at gcc dot gnu.org
2012-01-09 12:05 ` rguenth at gcc dot gnu.org
2012-01-09 20:30 ` gjl at gcc dot gnu.org
2012-01-12 16:19 ` gjl at gcc dot gnu.org
2012-01-12 17:18 ` [Bug tree-optimization/51782] -ftree-sra: Missing address-space information leads to wrong jamborm at gcc dot gnu.org
2012-01-12 18:09 ` gjl at gcc dot gnu.org
2012-01-17 15:26 ` rguenth at gcc dot gnu.org
2012-01-18  9:34 ` gjl at gcc dot gnu.org
2012-01-25 19:18 ` gjl at gcc dot gnu.org
2012-02-17 13:06 ` jamborm at gcc dot gnu.org
2012-02-17 18:01 ` jamborm at gcc dot gnu.org
2012-02-17 18:52 ` jamborm at gcc dot gnu.org
2012-02-19 10:16 ` gjl at gcc dot gnu.org
2012-02-20  9:43 ` rguenther at suse dot de
2012-02-20 17:57 ` jamborm at gcc dot gnu.org
2012-02-20 20:15 ` rguenther at suse dot de [this message]
2012-02-21 10:14 ` gjl at gcc dot gnu.org
2012-02-21 10:41 ` [Bug middle-end/51782] " jamborm at gcc dot gnu.org
2012-02-21 10:41 ` jamborm at gcc dot gnu.org
2012-02-21 11:51 ` dominiq at lps dot ens.fr
2012-02-21 11:58 ` gjl at gcc dot gnu.org
2012-02-21 13:20 ` jamborm at gcc dot gnu.org
2012-02-22 10:55 ` jamborm at gcc dot gnu.org
2012-02-22 11:00 ` jamborm at gcc dot gnu.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=bug-51782-4-mA5lBGVHfu@http.gcc.gnu.org/bugzilla/ \
    --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).