This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2749: Internal compiler error while using template
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2749: Internal compiler error while using template
- From: alexvn at bigfoot dot com
- Date: 6 May 2001 06:07:56 -0000
- Cc: alexv at scopus dot co dot il
- Reply-To: alexvn at bigfoot dot com
>Number: 2749
>Category: c++
>Synopsis: Internal compiler error while using template
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 05 23:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: alexvn@bigfoot.com
>Release: g++ 2.95.3
>Organization:
>Environment:
Linux 2.2.17-21mdk
>Description:
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:alexvn@bigfoot.com
============================
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: