This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/31431] New: [4.3 regression] ICE with invalid parameter pack


The following (IMHO invalid) code snippet triggers an ICE on mainline:

===========================================================
template<typename..., typename> void foo();

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

bug.cc: In function 'void bar()':
bug.cc:5: internal compiler error: tree check: expected class 'expression',
have 'type' (integer_type) in fn_type_unification, at cp/pt.c:11058
Please submit a full bug report, [etc.]

The slightly modified version below triggers a segfault:

===========================================================
template<typename, typename..., typename> void foo();

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

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

Doug, looks like fallout from your variadic template patch.

Btw., although it's not easter yet, I found a couple of more
variadic easter eggs. They should appear on bugzilla soon. ;-)


-- 
           Summary: [4.3 regression] ICE with invalid parameter pack
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-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=31431


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]