bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

g++ 2.95.3 : Internal compiler error while using template


From: Alex Vinokur
Subject: g++ 2.95.3 : Internal compiler error while using template
Date: Sun, 06 May 2001 09:09:41 +0200

Here is a bug-report.


### File ttt.C ###
//------------- C++ code : BEGIN -------------
   1
      2     template <typename XXX, typename YYY, typename ZZZ>
      3     class BBB;
      4
      5     template <typename XXX, typename YYY>
      6     class AAA
      7     {   // Line#7
      8     template <typename ZZZ> friend BBB<XXX, YYY, ZZZ>;
      9     };
     10
     11     template <typename XXX, typename YYY, typename ZZZ>
     12     class BBB {};
     13
     14     int main (void)
     15     {
     16     AAA<int, char> a;    // Line#16
     17       return 0;
     18
//------------- C++ code : END ---------------

//------------- System : BEGIN ----------------
%uname -sr
Linux 2.2.17-21mdk
//------------- System : END ------------------


//------------- Compiling : BEGIN --------------
g++ -v -save-temps ttt.C
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)
 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/cpp -lang-c++ -v
-D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__
-Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__
-D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386)
-Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586
-D__i586__ -D__pentium -D__pentium__ ttt.C ttt.ii
GNU CPP version 2.95.3 19991030 (prerelease) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/../../../../include/g++-3
 /usr/local/include
 
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/../../../../i586-mandrake-linux/include

 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/include
 /usr/include
End of search list.
The following default directories have been omitted from the search
path:
End of omitted list.
 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/cc1plus ttt.ii -quiet
-dumpbase ttt.cc -version -o ttt.s
GNU C++ version 2.95.3 19991030 (prerelease) (i586-mandrake-linux)
compiled by GNU C version 2.95.3 19991030 (prerelease).
ttt.C: In instantiation of `AAA<int,char>':
ttt.C:16:   instantiated from here
ttt.C:7: Internal compiler error.
ttt.C:7: Please submit a full bug report.
ttt.C:7: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
instructions.
//------------- Compiling : BEGIN --------------


//------------- File ttt.ii : BEGIN ---------------
# 1 "ttt.C"

    template <typename XXX, typename YYY, typename ZZZ>
    class BBB;

    template <typename XXX, typename YYY>
    class AAA
    {
    template <typename ZZZ> friend BBB<XXX, YYY, ZZZ>;
    };

    template <typename XXX, typename YYY, typename ZZZ>
    class BBB {};

    int main (void)
    {
    AAA<int, char> a;
      return 0;
    }
//------------- File ttt.ii : BEGIN ---------------

============================
Alex Vinokur
   mailto:address@hidden
   http://go.to/alexv_math
============================





reply via email to

[Prev in Thread] Current Thread [Next in Thread]