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]

C++/Linux-i386: Internal compiler error in `const_hash', at , varasm.c:2372


Hi!

g++ 2.95.2 just choked on a jump table:

---[snip]-- 
belbo@fs1:/usr/local/tmp/belbo/imagine/imagine> make
g++ -c -pipe -g -DQT_CLEAN_NAMESPACE -I. -I/usr/lib/qt2//include
-I/usr/X11R6/include -o Panorama.o Panorama.C
Panorama.C: In method `void Texture::setTexture(Panorama *, unsigned int,
unsigned int, unsigned int, unsigned int)':
Panorama.C:75: Internal compiler error in `const_hash', at varasm.c:2372
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
make: *** [Panorama.o] Error 1
---[snap]---

The offending sections looks like this:

---[snip]---
void Texture::setTexture(class Panorama *pan, unsigned int x, unsigned int
y,
                         unsigned int hsz, unsigned int vsz) {

        typedef void (Texture::*tile_t)(class Panorama *,
                unsigned int, unsigned int, unsigned int, unsigned int);

#define GCC_BARFS_HERE
#ifdef GCC_BARFS_HERE
        tile_t tile[4] = { &Texture::tile_simple, &Texture::tile_horiz,
                           &Texture::tile_vert, &Texture::tile_4 };
#else
        tile_t tile[4];
        tile[0] = &Texture::tile_simple;
        tile[1] = &Texture::tile_horiz;
        tile[2] = &Texture::tile_vert;
        tile[3] = &Texture::tile_4;
#endif
(...)
---[snap]---

The #else-part of the #ifdef is the workaround that compiles fine. Some
more details on my system:

belbo@fs1:/usr/local/tmp/belbo/imagine/imagine> g++ -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
gcc version 2.95.2 19991109 (Debian GNU/Linux)

belbo@fs1:/usr/local/tmp/belbo/imagine/imagine> uname -a
Linux fs1 2.2.13 #3 Don Okt 21 17:52:41 CEST 1999 i586 unknown

Attached you'll find Panorama.ii.gz, a gzipped version of CPP output from
the source file, produced with

---[snip]---

belbo@fs1:/usr/local/tmp/belbo/imagine/imagine> g++ -v --save-temps -c
-pipe -g -DQT_CLEAN_NAMESPACE -I. -I/usr/lib/qt2//include
-I/usr/X11R6/include -o Panorama.o Panorama.C
g++: Warning: -pipe ignored since -save-temps specified
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
gcc version 2.95.2 19991109 (Debian GNU/Linux)
 /usr/lib/gcc-lib/i386-linux/2.95.2/cpp -lang-c++ -v -I.
-I/usr/lib/qt2//include -I/usr/X11R6/include -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 -g -Acpu(i386) -Amachine(i386) -Di386
-D__i386 -D__i386__ -DQT_CLEAN_NAMESPACE Panorama.C Panorama.ii
GNU CPP version 2.95.2 19991109 (Debian GNU/Linux) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/lib/qt2/include
 /usr/X11R6/include
 /usr/lib/gcc-lib/i386-linux/2.95.2/../../../../include/g++-3
 /usr/local/include
 /usr/lib/gcc-lib/i386-linux/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i386-linux/2.95.2/../../../../i386-linux/include
End of omitted list.
 /usr/lib/gcc-lib/i386-linux/2.95.2/cc1plus Panorama.ii -quiet -dumpbase
Panorama.cc -g -version -o Panorama.s
GNU C++ version 2.95.2 19991109 (Debian GNU/Linux) (i386-linux) compiled
by GNU C version 2.95.2 19991109 (Debian GNU/Linux).
Panorama.C: In method `void Texture::setTexture(Panorama *, unsigned int,
unsigned int, unsigned int, unsigned int)':
Panorama.C:75: Internal compiler error in `const_hash', at varasm.c:2372
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
belbo@fs1:/usr/local/tmp/belbo/imagine/imagine> 

---[snap]---
Hope it was not me doing something stupid. :)

Regards,

Daniel.

Panorama.ii.gz


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