g++ 4.2: internal compiler error: in make_thunk, at cp/method.c:129

closed account (D4S8vCM9)
Hi,

does anybody experienced the same bug with g++ 4.2: internal compiler error: in make_thunk, at cp/method.c:129

I think it is not neccessary to include sample code. The respective code compiles without warnings and errors on several other newer g++ versions, as well as on clang++. It is simply correct and the bug was mentioned in the GCC's bugzilla (even several times, because it seems to recurr often), but no workaround was provided.

Please don't tell also to use a newer g++. I MUST compile it on the g++ shipped with Ubuntu Hardy, so I cannot change the compiler. Main development is done on Ubuntu Precise, but I need to keep it compatible to Hardy.

I have no idea what a thunk should be, I only suspect it has to do with covariants and/or multiple inheritance. Also I have several more similar structured header files, which all compile well, despite the only change is the name is the name of the class and I have no aim, to change that because of a compiler bug on Hardy.

Another fact is, it happens at include time.

In file included from /home/heiko/hgl/src/compiler/compilerprojectfactory.cpp:18:
/home/heiko/hgl/src/compiler/compilertype.h: In instantiation of 'HGL::Compiler::CompilerType<HGL::Vector2D, HGL::Compiler::CompilerBase>':
/home/heiko/hgl/src/compiler/compilervector2d.h:23: instantiated from here
/home/heiko/hgl/src/compiler/compilertype.h:22: internal compiler error: in make_thunk, at cp/method.c:129
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.Bug

closed account (Dy7SLyTq)
you might have installed gcc wrong
closed account (D4S8vCM9)
Sorry, but no. This Hardy installation (including g++) is as old as Hardy itself, used for thousands of projects and it is not the first time I got this bug, but with successive development of the code it disappeared after a while.

But currently it is disturbing, because just RIGHT now I need an Hardy build :-/
closed account (Dy7SLyTq)
so wait... you have a bug that you keep getting? then you need to use a different installation method
closed account (D4S8vCM9)
Actually I really need it as it is wanted by Ubuntu for Hardy. It has to build even on a new fresh Hardy.
For example a Hardy like I get on launchpad.net. There they generate for each build a fresh Hardy just with updates and security fixes applied.

But I will reinstall gcc (the Ubuntu way) and see what happens.

EDIT: reinstalled the g++ and the same problem again :-/
Last edited on
closed account (D4S8vCM9)
With help of some people from stackoverflow (http://stackoverflow.com/questions/15484466/g-4-2-internal-compiler-error-in-make-thunk-at-cp-method-c129) I got it fixed.

Solution I posted there too if somebody is interested, but so far, digging into g++ 4.2 source was neccessary :-/
Topic archived. No new replies allowed.