+2011-06-04 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/48893
+ PR tree-optimization/49091
+ PR tree-optimization/49179
+ * ipa-inline-analysis.c (evaluate_conditions_for_known_args):
+ Bounds check.
+
2011-06-04 Jan Hubicka <jh@suse.cz>
PR lto/48954
for (i = 0; VEC_iterate (condition, info->conds, i, c); i++)
{
- tree val = VEC_index (tree, known_vals, c->operand_num);
+ tree val;
tree res;
+ /* We allow call stmt to have fewer arguments than the callee
+ function (especially for K&R style programs). So bound
+ check here. */
+ if (c->operand_num < (int)VEC_length (tree, known_vals))
+ val = VEC_index (tree, known_vals, c->operand_num);
+ else
+ val = NULL;
+
if (!val)
{
clause |= 1 << (i + predicate_first_dynamic_condition);
+2011-06-04 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/48893
+ PR tree-optimization/49091
+ PR tree-optimization/49179
+ * gfortran.dg/pr49179.f90: New testcase
+
2011-06-04 Jan Hubicka <jh@suse.cz>
PR lto/48954
--- /dev/null
+! { dg-options " -O -findirect-inlining" }
+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