[Bug lto/51325] New: [4.7 Regression] ICE with -flto and union in template

reichelt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Nov 27 21:50:00 GMT 2011


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

             Bug #: 51325
           Summary: [4.7 Regression] ICE with -flto and union in template
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


The following valid code snippet triggers an ICE on trunk when compiled with
"-flto -g":

============================
template<int> void foo()
{
  union { int i; };
  i = 0;
}

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

bug.cc: In function 'foo<0>()void':
bug.cc:5:1: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]



More information about the Gcc-bugs mailing list