This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51782] -ftree-sra: Missing address-space information leads to wrong
- From: "jamborm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2012 17:27:36 +0000
- Subject: [Bug tree-optimization/51782] -ftree-sra: Missing address-space information leads to wrong
- Auto-submitted: auto-generated
- References: <bug-51782-4@http.gcc.gnu.org/bugzilla/>
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?