This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ 2.95.2 bug report
- To: "'gcc bug reports'" <gcc-bugs at gcc dot gnu dot org>
- Subject: g++ 2.95.2 bug report
- From: John Pedretti <pedretti at roguewave dot com>
- Date: Thu, 9 Dec 1999 18:26:58 -0700
- Cc: Boulder Stdtools <bcostdtools at roguewave dot com>
Hi,
This is a g++ 2.95.2 bug report. Compiling the code below causes an internal
compiler error. The important points are: only occurs in namespace scope
(namespace x in the example), in a partially specialized class (foo<bool,U>)
that contains a nested class (bar) that declares the unspecialized
containing class (foo) friend.
I believe this code compiled on a previous version of the compiler (2.95.1
?).
Thanks,
John
===================================
% cat test.cpp
namespace x {
template <class A, class B>
class foo { };
template <class U>
class foo <bool, U> {
class bar {
template <class A, class B>
friend class foo;
};
};
}
% g++ -v -c test.cpp
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/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__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro
-D__pentiumpro__ test.cpp /tmp/ccYt7HYD.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../include/g++-3
/usr/local/include
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../i686-pc-linux-gnu/incl
ude
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/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/i686-pc-linux-gnu/2.95.2/cc1plus /tmp/ccYt7HYD.ii -quiet
-dumpbase test.cc -version -o /tmp/ccolatk7.s
GNU C++ version 2.95.2 19991024 (release) (i686-pc-linux-gnu) compiled by
GNU C version 2.95.2 19991024 (release).
test.cpp:11: Internal compiler error.
test.cpp:11: Please submit a full bug report.
test.cpp:11: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport>
for instructions.
===========================
John A. Pedretti, Rogue Wave Software, Inc.
(303) 545-3150 pedretti@roguewave.com
===========================