public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/36846]  New: ICE with variadic templates partial specialisation
@ 2008-07-16  0:49 tristan at wibberley dot org
  2008-08-16 23:36 ` [Bug c++/36846] " tristan at wibberley dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tristan at wibberley dot org @ 2008-07-16  0:49 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3323 bytes --]

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-01-07 20:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-16  0:49 [Bug ada/36846] New: ICE with variadic templates partial specialisation tristan at wibberley dot org
2008-08-16 23:36 ` [Bug c++/36846] " tristan at wibberley dot org
2008-08-22  0:23 ` tristan at wibberley dot org
2008-11-29  0:38 ` tristan at wibberley dot org
2008-12-31 20:22 ` [Bug c++/36846] [4.3/4.4 regression] ICE with variadic templates partial specialization reichelt at gcc dot gnu dot org
2009-01-03 15:29 ` rguenth at gcc dot gnu dot org
2009-01-03 15:51 ` tristan at wibberley dot org
2009-01-06 16:14 ` jason at gcc dot gnu dot org
2009-01-07 20:44 ` jason at gcc dot gnu dot org
2009-01-07 20:49 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).