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

折月煮酒 提交于 2019-11-28 09:20:28

问题


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?


回答1:


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).




回答2:


This happens to me sometimes when I download a bunch of assets. Anything can go wrong, from two scripts sharing a namespace or the scripts not being for the version of Unity you are using.

My advice is to:

1) Check all your scripts to see if there are any duplicate names, make sure you keep them organized in folders to make this simpler!

and

2) IF you can't figure out at all what is going on, start be deleting the asset folders you downloaded starting from newest to oldest. Check every time you get rid of an asset folder to see if your errors change. Once you have found which script was causing the trouble, it's just a matter of finding out why.




回答3:


They indicate that the compiler has found errors or inconsistensies in itself. Similar to using assert in your code.

If you compile something that is very odd and illegal code, it could just be that the compiler team hasn't tested this use case. Otherwise it is likely a problem with the compiler.




回答4:


If you get an internal compiler error odds are that it could be due to bad hardware. Maybe your RAM is faulty? Try running memtest86.



来源:https://stackoverflow.com/questions/12405606/what-do-internal-compiler-error-messages-mean-and-what-can-i-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!