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++/11347] New: ICE on valid expression in default value for int argument to inner template.


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE on valid expression in default value for int
                    argument to inner template.
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dasendeistnah at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

The data here is from gcc 3.3, but 2.95.3, 3.2.2, 3.4CVS also generate ICE.

bash-2.05$ g++3.3 -v -save-temps -c ice.C
Reading specs from /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr/local/gcc-3.3
--enable-threads --enable-version-specific-runtime-libs
Thread model: posix
gcc version 3.3
 /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/cc1plus -E -D__GNUG__=3
-quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D_GNU_SOURCE
ice.C ice.ii
ignoring nonexistent directory "/usr/local/gcc-3.3/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/c++
 /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/c++/i686-pc-linux-gnu
 /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/c++/backward
 /usr/local/include
 /usr/local/gcc-3.3/include
 /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/include
 /usr/include
End of search list.
 /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/cc1plus -fpreprocessed
ice.ii -quiet -dumpbase ice.C -auxbase ice -version -o ice.s
GNU C++ version 3.3 (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48266
ice.C: In instantiation of `T2<int>':
ice.C:9:   instantiated from here
ice.C:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


# 1 "ice.C"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "ice.C"
template <class T> struct T1 {
  enum {N};
};

template<class T> struct T2 {
  template <class S, bool Z = T1<S>::N + 1> struct B {};
};

T2<int> t;


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