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]

ICE 108:virtual function throw w/template superclass


In the following code, when the superclass is not a template, the ICE
does not occur.

I searched the gcc-bugs maillist for all the words {Internal,error,
#108,incomplete_type_error}.  One hit resulted, but it had been
patched some time ago(1998-01-11).
-------------------
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/bin/g++ -v
Reading specs from
/mnt/scratch/gcc-2.96/latest-cvs/lib/gcc-lib/i586-pc-linux/2.96/specs
gcc version 2.96 20000812 (experimental)
-------------------
cat bug1.cpp
template
  < typename SUBJ_TOP
  >
  class
SubjTop_zomable
  : public SUBJ_TOP
  {
  public:
        typedef
      SubjTop_zomable<SUBJ_TOP>
    SubjTopZomableType
      ;
      struct
    ZombieAccess
      {}
      ;
        virtual
      SubjTopZomableType*
    var_self(void)
      throw(ZombieAccess)
      =0
      ;
  };
template
  < typename SUBJ_TOP
  >
  class
SubjZombie
  : public SubjTop_zomable<SUBJ_TOP>
  {
  public:
        typedef
      SubjTop_zomable<SUBJ_TOP>
    SuperType
      ;
        typedef
      typename SuperType::SubjTopZomableType
    SubjTopZomableType
      ;
        typedef
      typename SuperType::ZombieAccess
    ZombieAccess
      ;
      SubjTopZomableType*
    var_self(void)
      throw(ZombieAccess)
      ;
  };
-------------------
/mnt/scratch/gcc-2.96/latest-cvs/bin/g++ -c   bug1.cpp
bug1.cpp:46: Internal error #108.
bug1.cpp:46: Internal compiler error in incomplete_type_error, at
cp/typeck2.c:240
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [compile] Error 1



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