This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50741] [4.7 Regression] remove_unused_locals causes seg fault
- From: "matz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Oct 2011 15:28:47 +0000
- Subject: [Bug middle-end/50741] [4.7 Regression] remove_unused_locals causes seg fault
- Auto-submitted: auto-generated
- References: <bug-50741-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50741
Michael Matz <matz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #5 from Michael Matz <matz at gcc dot gnu.org> 2011-10-17 15:28:47 UTC ---
And of course, it's the ctor cloning:
DECL_CONTEXT of _rL_53 is <function_decl 0x7ffff53db000 A>,
but current_function_decl is <function_decl 0x7ffff53db200 __base_ctor>.
So it's similar to PR50640, in that the initializers of statics declared
in different functions aren't walked. That's reasonable assuming that
such initializers are walked when the declaring function is handled (which
is reasonable to expect, as otherwise the initializer couldn't have been
known). But here the cloning and rewriting gets into our way.