This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc++/32320] New: [4.1 regression] ICE with invalid template parameter
- From: "uhle1982 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2007 15:32:17 -0000
- Subject: [Bug objc++/32320] New: [4.1 regression] ICE with invalid template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
+++ This bug was initially created as a clone of Bug #27668 +++
The following invalid code snippet triggers an ICE since GCC 3.4.0:
==================================================
template<typename class T, T = T()> struct A {};
template<int> void foo(A<int>);
==================================================
bug.cc:1: error: expected nested-name-specifier before 'class'
bug.cc:1: error: two or more data types in declaration of 'parameter'
bug.cc:1: error: 'struct T' is not a valid type for a template constant
parameter
bug.cc:3: error: type/value mismatch at argument 1 in template parameter list
for 'template<int <anonymous>, void <anonymous> > struct A'
bug.cc:3: error: expected a constant of type 'int', got 'int'
bug.cc:3: internal compiler error: in value_dependent_expression_p, at
cp/pt.c:12489
Please submit a full bug report, [etc.]
--
Summary: [4.1 regression] ICE with invalid template parameter
Product: gcc
Version: new-ra
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: objc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uhle1982 at yahoo dot com
GCC build triplet: same
GCC host triplet: Seize
GCC target triplet: like
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32320