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:18:08 +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
--- Comment #4 from Michael Matz <matz at gcc dot gnu.org> 2011-10-17 15:18:08 UTC ---
Reducable to:
% cat x.cc
struct PublishLo
{
const char *functionName;
~PublishLo();
};
struct A { A(); };
A::A()
{
static PublishLo _rL_53 = {__FUNCTION__};
}
The problem doesn't happen when A::A is instead a normal top-level function,
which leads me to believe that somehow for member functions something forgets
to walk the initializers in add_referenced_var.