While compiling some heavily templated code using member variable pointers, g++
crashes.  g++ is standard version installed with ubuntu hardy.

Changing line 49159 of js.ii from (self->*func)(a1, a2, a3); to  
self->*func(a1, a2, a3); removes the ICE (however due to an (unresolved) bug in
my program on the program will fail to compile with "error: must use ‘.*’
or ‘->*’ to call pointer-to-member function in ‘func (...)’" (which to
my understanding I am using ->* correctly, but obviously I'm not).

Compiled with: g++ -v -save-temps -Iinclude -I/usr/include/CEGUI -O3 -W -Wextra
-g -pg -c -o js.o js.cpp

gcc appears to be in the process of identifying the line number of my error
during the crash.  it suggests it's on include/jswrap.hpp:283, but it is in
fact due to code on line include/jswrap.hpp:91 (aka js.ii:49159) which is
called by code on include/jswrap.hpp:283.

The crash appears reproducible in this exact one case, and can be removed/added
by changing the ()'s, and nothing else on the machine appears to be having
issues, so I don't think it's hardware related.

gcc diagnostics:
$ g++ -v -save-temps -Iinclude -I/usr/include/CEGUI -O3 -W -Wextra -g -pg -c -o
js.o js.cpp
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-targets=all --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
 /usr/lib/gcc/i486-linux-gnu/4.2.4/cc1plus -E -quiet -v -Iinclude
-I/usr/include/CEGUI -D_GNU_SOURCE js.cpp -mtune=generic -W -Wextra
-fworking-directory -O3 -fpch-preprocess -o js.ii
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 include
 /usr/include/CEGUI
 /usr/include/c++/4.2
 /usr/include/c++/4.2/i486-linux-gnu
 /usr/include/c++/4.2/backward
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.2.4/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.2.4/cc1plus -fpreprocessed js.ii -quiet
-dumpbase js.cpp -mtune=generic -auxbase-strip js.o -g -O3 -W -Wextra -version
-p -fstack-protector -fstack-protector -o js.s
GNU C++ version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) (i486-linux-gnu)
        compiled by GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64447
Compiler executable checksum: cca9b7b48c023363b938f208576b99cc
js.cpp:318: warning: missing initializer for member ‘JSFunctionSpec::flags’
js.cpp:318: warning: missing initializer for member ‘JSFunctionSpec::extra’
js.cpp:318: warning: missing initializer for member ‘JSFunctionSpec::call’
js.cpp:318: warning: missing initializer for member ‘JSFunctionSpec::nargs’
js.cpp:318: warning: missing initializer for member ‘JSFunctionSpec::flags’
js.cpp:318: warning: missing initializer for member ‘JSFunctionSpec::extra’
js.cpp:324: warning: missing initializer for member ‘JSFunctionSpec::flags’
js.cpp:324: warning: missing initializer for member ‘JSFunctionSpec::extra’
js.cpp:324: warning: missing initializer for member ‘JSFunctionSpec::call’
js.cpp:324: warning: missing initializer for member ‘JSFunctionSpec::nargs’
js.cpp:324: warning: missing initializer for member ‘JSFunctionSpec::flags’
js.cpp:324: warning: missing initializer for member ‘JSFunctionSpec::extra’
include/jswrap.hpp: In static member function ‘static JSBool
classwrapper<WrappedClass, arg1_t, arg2_t, arg3_t>::jswrapmethod(JSContext*,
JSObject*, uintN, jsval*, jsval*) [with ret_t = void, marg1_t = float, marg2_t
= float, marg3_t = float, ret_t (WrappedClass::* func)(marg1_t, marg2_t,
marg3_t) = func, WrappedClass = vec3, arg1_t = float, arg2_t = float, arg3_t =
float]’:
include/jswrap.hpp:283: internal compiler error: in make_decl_rtl, at
varasm.c:1007
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.


-- 
           Summary: ICE in make_decl_rtl, at varasm.c:1007
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gccbug at isomer dot meta dot net dot nz
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39842

Reply via email to