I have been writing a GCC inter procedural plugin where I have to insert GIMPLE statements at certain points in the program. After this I perform a data flow analysis on the complete program. When I am done with my analysis I am removing those newly inserted GIMPLE statements.
My analysis is getting completed but just before exiting from it the following message is generated:
internal compiler error: in execute_ipa_pass_list, at passes.c:1817
This is surely because of the insertion of GIMPLE statements, if I don't do that I won't get this error message.
Could anyone help me out and explain what is the problem and how to fix it?
This usually happens when GCC code contains an assertion which turns out to be
false
.The line 1817 in
passes.c
(which is part of the GCC sources, in thegcc
sub-directory of the GCC source tree) has a piece of code which looks like:gcc_assert (some_condition);
In your case,
some_condition
was false, but the compiler expects it to be alwaystrue
(this is why the author of the code wrote the assertion in the first place).You did something in your plugin which made it
false
, and you need to fix it.What did you do wrong? It really depends. Open up
passes.c
and find that line, and see what it is checking. In my copy of GCC, the relevant function reads:There are four
gcc_assert
statements. Your plugin caused one of them to become false. i.e. you messed with one of the variables:This is probably what's wrong.