http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53470
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-11
12:38:06 UTC ---
Removing the whole
if (debug_info_level < DINFO_LEVEL_TERSE
|| (TYPE_CONTEXT (type)
&& TREE_CODE (TYPE_CONTEXT (type)) != FUNCTION_DECL
&& TREE_CODE (TYPE_CONTEXT (type)) != NAMESPACE_DECL))
TYPE_CONTEXT (type) = NULL_TREE;
block causes us to ICE for gcc.c-torture/execute/20111208-1.c and
gcc.c-torture/execute/pr42833.c
Even though I think that would be the correct thing to do.
Reduced testcase for that ICE:
int main ()
{
{
union { } v;
}
}
works with
int main ()
{
union { } v;
}