http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49221
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-06
03:51:55 UTC ---
During EH lowering the back end wants to replace a TYPE with something else
that represents the type at runtime. objc_eh_runtime_type generates such a
thing, and tries to generate a DECL, but we're in function scope at the time so
we try to add a DECL_EXPR for the DECL, which breaks.
We definitely shouldn't be trying to add a DECL_EXPR for a non-local variable.
I suppose it's easy enough to work around this in cp_finish_decl, though there
might be other code that assumes that any new variable while we're in function
scope belongs to that scope.