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.

Reply via email to