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

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.

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

Reply via email to