This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12346] New: cp/decl.c:1178 asserts if class "iterator" defined in a subclass with wrapped multimap
- From: "ervan at tharas dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2003 01:46:27 -0000
- Subject: [Bug c++/12346] New: cp/decl.c:1178 asserts if class "iterator" defined in a subclass with wrapped multimap
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12346
Summary: cp/decl.c:1178 asserts if class "iterator" defined in a
subclass with wrapped multimap
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ervan at tharas dot com
CC: gcc-bugs at gcc dot gnu dot org
When compiling under g++ 3.3.1 on Solaris or g++ 3.2.2 on x86 Red Hat 7.x
the following program causes g++ to assert as listed in the verbose output.
Note that naming the inner class "iterator" is critical to producing the
failure.
This message contains:
1) The unpreprocessed source for reference
2) the -v output
This "Description" edit box won't accept the preprocessed output due to length
and the bug description form has no obvious option for attaching source.
Regardless, it's the standard "map" header distributed with gcc 3.2.2 that is
being used. Please advise if I can send the preprocessed output some other way.
#include <map>
using namespace std;
struct base {
class iterator { };
};
struct mymap : public base {
class map_wrap : public multimap<int, int>
{ };
class iterator { };
};
Thread model: posix
gcc version 3.2.2
/import/manx/tools/gcc/dist/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/cpp0 -lang-c++
-D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v -iprefix
/home/builder/Shadows/V2.0/linux/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/
-D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=2 -D__GXX_ABI_VERSION=102
-D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__
-D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__
-D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ t2.cc t2.ii
GNU CPP version 3.2.2 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory
"/home/builder/Shadows/V2.0/linux/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../include/c++/3.2.2"
ignoring nonexistent directory
"/home/builder/Shadows/V2.0/linux/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../include/c++/3.2.2/i686-pc-linux-gnu"
ignoring nonexistent directory
"/home/builder/Shadows/V2.0/linux/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../include/c++/3.2.2/backward"
ignoring nonexistent directory
"/home/builder/Shadows/V2.0/linux/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include"
ignoring nonexistent directory
"/home/builder/Shadows/V2.0/linux/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../i686-pc-linux-gnu/include"
ignoring nonexistent directory
"/import/manx/tools/gcc/dist/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/import/manx/tools/gcc/dist/include/c++/3.2.2
/import/manx/tools/gcc/dist/include/c++/3.2.2/i686-pc-linux-gnu
/import/manx/tools/gcc/dist/include/c++/3.2.2/backward
/usr/local/include
/import/manx/tools/gcc/dist/include
/import/manx/tools/gcc/dist/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include
/usr/include
End of search list.
/import/manx/tools/gcc/dist/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/cc1plus
-fpreprocessed t2.ii -quiet -dumpbase t2.cc -version -o t2.s
GNU CPP version 3.2.2 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.2 (i686-pc-linux-gnu)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-98).
t2.cc:10: Internal compiler error in pop_binding, at cp/decl.c:1178
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
~
~
~
~
~
~
~
~
~
~