The following valid code snippet triggers an ICE on mainline:

=================================================================
typedef union { int i; } U __attribute__((transparent_union));

static void foo(U) {}
static void foo(int) {}

void bar()
{
  foo(0);
}
=================================================================

bug.cc: In function 'void bar()':
bug.cc:8: internal compiler error: same canonical type node for different types
<anonymous union> and U
Please submit a full bug report, [etc.]


-- 
           Summary: [4.4 regression] ICE with attribute transparent_union
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35315

Reply via email to