diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 30ef9f36a7d..7bb9dc96c01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-08-05 Kugan Vivekanandarajah + + * tree-vrp.c (extract_range_basic): Check cfun->after_inlining + before folding call to __builtin_constant_p with parameters to false. + 2016-08-05 Alan Modra * config/rs6000/rs6000.c (rs6000_preferred_reload_class): Delete diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index cee6424b009..7c7ad914f94 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -3785,7 +3785,8 @@ extract_range_basic (value_range *vr, gimple *stmt) arg = gimple_call_arg (stmt, 0); if (TREE_CODE (arg) == SSA_NAME && SSA_NAME_IS_DEFAULT_DEF (arg) - && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL) + && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL + && cfun->after_inlining) { set_value_range_to_null (vr, type); return;