[Bug middle-end/50741] [4.7 Regression] remove_unused_locals causes seg fault

matz at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 17 15:18:00 GMT 2011


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.



More information about the Gcc-bugs mailing list