http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49772
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-08
11:39:21 UTC ---
It's a complete mystery to me how this cgraph node cloning and edge code
works. We create the inline clone for a completely different edge
(that _is_ decided to be inlined) than the one we later fail on
(that one is _not_ marked inline and does _not_ have an inline clone callee).
Thus, we shouldn't arrive at this situation at all. Instead we seem to fail
to inline a call that we should inline (and decided to inline) because of:
/* Expand calls to inline functions in the body of FN. */
unsigned int
optimize_inline_calls (tree fn)
{
...
/* There is no point in performing inlining if errors have already
occurred -- and we might crash if we try to inline invalid
code. */
if (seen_error ())
return 0;
which leaves us with such state.
So this is yet another case of overeager fail to complete our task.
I suppose we can remove that late fail now that we bail out way earlier
at proper IPA "scope".
The ICE is fixed with removing the above out.