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]

c++/v2.97 ice when inner template arg has default


cd /home/evansl/prog_dev/gcc_all/tests/SubjStateType/
make -k bugreport
-------------------
There is no ICE when there's no default value for In_FARG1.
-------------------
-------------------
/mnt/scratch/gcc-2.96/latest-cvs/debug/install/bin/g++ -c   2.cpp
2.cpp: In instantiation of `OutTmpl<E1>':
2.cpp:37:   instantiated from here
2.cpp:13: Internal compiler error in tsubst_decl, at cp/pt.c:5983
Please submit a full bug report.
 See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [compile] Error 1
-------------------
cat 2.cpp
  enum
Enum0
  { E0
  , E1
  , E2
  }
  ;
//=================================
  enum
Enum1
  { E3=E2+1
  , E4=E3+1
  }
  ;
//=================================
template
  < Enum0 Out_FARG0
  >
  class
OutTmpl
  {
  public:
    template
      < Enum0 In_FARG0
      , Enum1 In_FARG1=E4
      >
      class
    InTmpl
      {
      }
      ;//end InTmpl class
  }
  ;//end OutTmpl class
//=================================
      OutTmpl<E1>
    m
      ;
uname -a
Linux localhost.localdomain 2.2.13-4mdk #1 Tue Sep 7 18:23:11 CEST 1999 i586 unknown
/mnt/scratch/gcc-2.96/latest-cvs/debug/install/bin/g++ -v
Reading specs from /mnt/scratch/gcc-2.96/latest-cvs/debug/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/specs
Configured with: /mnt/scratch/gcc-2.96/latest-cvs/gcc/configure --prefix=/mnt/scratch/gcc-2.96/latest-cvs/debug/install --with-local-prefix=/mnt/scratch/gcc-2.96/latest-cvs/debug/local --with-gxx-include-dir=/mnt/scratch/gcc-2.96/latest-cvs/debug/local/g++ --enable-languages=c++ --enable-checking --enable-debug --enable-libgcc-rebuild=/mnt/scratch/gcc-2.96/latest-cvs/debug/build : (reconfigured)
gcc version 2.97 20001222 (experimental)



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