This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/36846] New: ICE with variadic templates partial specialisation
- From: "tristan at wibberley dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jul 2008 00:49:05 -0000
- Subject: [Bug ada/36846] New: ICE with variadic templates partial specialisation
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code ICEs. This isn't preprocessed but is trivial and the preprocessor
lines highlight a change that switches the ICE on and off so I've left it in to
help.
*****************************************
template<typename A, typename B>
struct pair;
template<typename... T>
struct pairs;
template<typename... AS, typename... BS>
struct pairs<pair<AS, BS>...> {
#ifndef NO_ICE
struct mismatched_packs {};
#endif
};
template class pairs<
pair<int, int>,
pair<int, int>
>;
*****************************************
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --enable-languages=c++
Thread model: posix
gcc version 4.4.0 20080712 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-c' '-std=c++0x' '-shared-libgcc'
'-mtune=generic'
/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1plus -E -quiet -v
-D_GNU_SOURCE fail.cc -mtune=generic -std=c++0x -O3 -fpch-preprocess -o fail.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../include/c++/4.4.0
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../include/c++/4.4.0/x86_64-unknown-linux-gnu
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../include/c++/4.4.0/backward
/usr/local/include
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-c' '-std=c++0x' '-shared-libgcc'
'-mtune=generic'
/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1plus -fpreprocessed
fail.ii -quiet -dumpbase fail.cc -mtune=generic -auxbase fail -O3 -std=c++0x
-version -o fail.s
GNU C++ (GCC) version 4.4.0 20080712 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.4.0 20080712 (experimental), GMP version
4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: f6a0a74a0d4d0fcd1077c2c18ac6908a
fail.cc: In instantiation of ?pairs<pair<int, int>, pair<int, int> >?:
fail.cc:14: instantiated from here
fail.cc:10: error: mismatched argument pack lengths while expanding ?pair<AS,
BS>?
fail.cc: In instantiation of ?pairs<pair<int, int>, pair<int, int>
>::mismatched_packs?:
fail.cc:14: instantiated from here
fail.cc:10: internal compiler error: tree check: expected class ?type?, have
?exceptional? (error_mark) in instantiate_class_template, at cp/pt.c:6945
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE with variadic templates partial specialisation
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tristan at wibberley dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36846