Bug 27058 - ICE in dwarf2out_finish
Summary: ICE in dwarf2out_finish
Status: RESOLVED DUPLICATE of bug 26881
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 13:38 UTC by Jakub Jelinek
Modified: 2006-08-22 22:38 UTC (History)
8 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2006-04-06 13:38:03 UTC
int
foo (void)
{
  if (0)
    {
      static union
      {
        long i;
        char c[8];
      } u;
      u.i = 0x01020304;
      return u.c[0] == 0x01 && u.c[1] == 0x02;
    }
  return 0;
}

ICEs at -g -O0 in dwarf2out_finish, because the UNION_TYPE has TYPE_CONTEXT set, but not to some FUNCTION_DECL, but to BLOCK (that has been optimized out).
Comment 1 Andrew Pinski 2006-04-06 16:21:36 UTC

*** This bug has been marked as a duplicate of 26881 ***