What do internal compiler error messages mean, and what can I do?

Vokram picture Vokram · Sep 13, 2012 · Viewed 19.3k times · Source

I was trying to compile my C++ program, which uses MPICH and NAG C library (I use NAG to generate random numbers), with a pgCC compiler.

However, the compiler gave me the following error message:

PGCC-S-0000-Internal compiler error. linearize: bad ili #:       0 (mpisim.C: 225)
PGCC-S-0000-Internal compiler error. gen_aili: unrec. ili opcode:       0 (mpisim.C: 225)
PGCC-S-0000-Internal compiler error. linearize: bad ili #:       0 (mpisim.C: 266)
PGCC-S-0000-Internal compiler error. gen_aili: unrec. ili opcode:       0 (mpisim.C: 266)
PGCC/x86 Linux 12.4-0: compilation completed with severe errors

I have no idea what these messages are referring to. Can someone explain to me what they mean?

Is there a way for me to figure out the position of the problematic line(s)? Does the 255 in (mpisim.C: 225) indicate the line number in my code?

Answer

Kerrek SB picture Kerrek SB · Sep 13, 2012

An internal compiler error is a bug in the compiler. There's not much you can do short of raising the problem with the compiler vendor.

Usually, ICEs happen when you attempt to compile incorrect code, but it is also entirely conceivable for a compiler to choke on valid C++. The language is so complex that it is hard to test every possible feature in all possible combinations.

If you manage to figure out the line of code that's causing the crash, you could try and rewrite it in simpler terms (e.g. by introducing additional local variables or typedefs).