ICE Using const variable in c++ class
Jeremy Sanders
jss@ast.cam.ac.uk
Wed Jul 12 06:18:00 GMT 2000
Hi,
I think this is an ICE on valid code. I can't see why there's anything
wrong here.
version: gcc 2.95.2 19991024, RedHat Linux (2.2.16 kernel), i386
command line: g++ --save-temps -v -c -Wall pixelcache.cc
xpc6:~/newprogs/xspec-chandra> g++ --save-temps -v -c -Wall pixelcache.cc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/lib/gcc-lib/i386-redhat-linux/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 -Wall -Acpu(i386) -Amachine(i386) -Di386
-D__i386 -D__i386__ pixelcache.cc pixelcache.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/data/soft3/lheasoft_50/lheasoft/Linux_2.2_i686/include
/usr/lib/gcc-lib/i386-redhat-linux/2.95.2/../../../../include/g++-3
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-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-redhat-linux/2.95.2/../../../../i386-redhat-linux/includeEnd
of omitted list.
/usr/lib/gcc-lib/i386-redhat-linux/2.95.2/cc1plus pixelcache.ii -quiet
-dumpbase pixelcache.cc -Wall -version -o pixelcache.s
GNU C++ version 2.95.2 19991024 (release) (i386-redhat-linux) compiled by
GNU C version 2.95.2 19991024 (release).
pixelcache.cc: In method `pixelcache::pixelcache(const CFITSImage *)':
pixelcache.cc:10: Internal compiler error.
pixelcache.cc:10: Please submit a full bug report.
pixelcache.cc:10: See
<URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
I can stop the ICE by removing the const in line 4551. The code also
compiles correctly by removing pixelcache's constructor.
I /think/ this is valid code, but please correct me if I'm wrong.
Jeremy
--
Jeremy Sanders <jss@ast.cam.ac.uk> http://www-xray.ast.cam.ac.uk/~jss/
Pembroke College, Cambridge. UK Institute of Astronomy, Cambridge. UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixelcache.ii.bz2
Type: application/x-bzip2
Size: 9506 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000712/0baca53e/attachment.bz2>
More information about the Gcc-bugs
mailing list