re PR debug/54177 (Segfault in cselib_lookup due to NULL_RTX passed from vt_add_function_parameter)

PR debug/54177
* var-tracking.c (vt_add_function_parameter): Bail if
var_lowpart fails.

From-SVN: r191999
This commit is contained in:
Alexandre Oliva 2012-10-02 19:58:37 +00:00 committed by Alexandre Oliva
parent a91529c4eb
commit 75a5b7dd33
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-10-02 Alexandre Oliva <aoliva@redhat.com>
PR debug/54177
* var-tracking.c (vt_add_function_parameter): Bail if
var_lowpart fails.
2012-10-02 H.J. Lu <hongjiu.lu@intel.com> 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
PR target/54741 PR target/54741

View File

@ -9428,6 +9428,7 @@ vt_add_function_parameter (tree parm)
&& GET_CODE (incoming) != PARALLEL) && GET_CODE (incoming) != PARALLEL)
{ {
cselib_val *val; cselib_val *val;
rtx lowpart;
/* ??? We shouldn't ever hit this, but it may happen because /* ??? We shouldn't ever hit this, but it may happen because
arguments passed by invisible reference aren't dealt with arguments passed by invisible reference aren't dealt with
@ -9436,7 +9437,11 @@ vt_add_function_parameter (tree parm)
if (offset) if (offset)
return; return;
val = cselib_lookup_from_insn (var_lowpart (mode, incoming), mode, true, lowpart = var_lowpart (mode, incoming);
if (!lowpart)
return;
val = cselib_lookup_from_insn (lowpart, mode, true,
VOIDmode, get_insns ()); VOIDmode, get_insns ());
/* ??? Float-typed values in memory are not handled by /* ??? Float-typed values in memory are not handled by