Created attachment 24575 [details] reduced testcase (the same as gfortran.dg/pr49179.f90) Compiler output: $ gcc -O -findirect-inlining -fno-guess-branch-probability -finline-functions -finline-small-functions testcase.f90 testcase.f90:8:0: internal compiler error: vector VEC(int,base) index domain error, in remap_predicate at ipa-inline-analysis.c:1876 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r175265 - crash
Revision 172608 is OK, 173763 is not. Note that the ICE is gone for versions bootstrapped with --enable-checking=release.
Re-confirmed.
Problem here is that more_ok is compiled into function having 4 parameters (where first parameter is return value) and it is called with 3 parameters. My fortran fu is not on par to tell if this is expected. Originally I assumed that we won't inline this case since we will consider the call uninlinable. We however do that only on type mismatch, not on mismatch in number of parameters. Will fix that with bounds check.
Author: hubicka Date: Fri Aug 5 20:56:05 2011 New Revision: 177484 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177484 Log: + PR middle-end/49494 + * ipa-inline-analysis.c (remap_predicate): Add bounds check. + * gfortran.dg/pr49494.f90: New testcase. Added: trunk/gcc/testsuite/gfortran.dg/pr49494.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-inline-analysis.c trunk/gcc/testsuite/ChangeLog
Assuming this is fixed.