+ PR middle-end/49494 + * ipa-inline-analysis.c (remap_predicate): Add bounds check.

+ 	PR middle-end/49494
+ 	* ipa-inline-analysis.c (remap_predicate): Add bounds check.
+ 	* gfortran.dg/pr49494.f90: New testcase.

From-SVN: r177484
This commit is contained in:
Jan Hubicka 2011-08-05 22:56:05 +02:00 committed by Jan Hubicka
parent 75d3e6e372
commit 9911e25a27
4 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-08-05 Jan Hubicka <jh@suse.cz>
PR middle-end/49494
* ipa-inline-analysis.c (remap_predicate): Add bounds check.
2011-08-05 Jan Hubicka <jh@suse.cz>
PR middle-end/49500

View File

@ -1873,6 +1873,7 @@ remap_predicate (struct inline_summary *info, struct inline_summary *callee_info
/* See if we can remap condition operand to caller's operand.
Otherwise give up. */
if (!operand_map
|| VEC_length (int, operand_map) <= c->operand_num
|| VEC_index (int, operand_map, c->operand_num) == -1)
cond_predicate = true_predicate ();
else

View File

@ -1,3 +1,8 @@
2011-08-05 Jan Hubicka <jh@suse.cz>
PR middle-end/49494
* gfortran.dg/pr49494.f90: New testcase.
2011-08-05 Jan Hubicka <jh@suse.cz>
PR middle-end/49735

View File

@ -0,0 +1,12 @@
! { dg-do compile }
! { dg-options "-O -findirect-inlining -fno-guess-branch-probability -finline-functions -finline-small-functions" }
function more_OK (fcn)
character(*) more_OK
character (*), external :: fcn
more_OK = fcn ()
end function more_OK
character(4) :: answer
character(4), external :: is_OK, more_OK
answer = more_OK (is_OK)
contains
END