Commit b3681f13 by Tom de Vries Committed by Tom de Vries

re PR tree-optimization/55890 (calling a builtin func through a cast triggers an ICE)

2013-01-12  Tom de Vries  <tom@codesourcery.com>

	PR middle-end/55890
	* calls.c (expand_call): Check if arg_nr is valid.

From-SVN: r195119
parent 93b2c9a5
2013-01-12 Tom de Vries <tom@codesourcery.com>
PR middle-end/55890
* calls.c (expand_call): Check if arg_nr is valid.
2013-01-11 Michael Meissner <meissner@linux.vnet.ibm.com> 2013-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
* doc/extend.texi (X86 Built-in Functions): Add whitespace in * doc/extend.texi (X86 Built-in Functions): Add whitespace in
......
...@@ -3134,7 +3134,9 @@ expand_call (tree exp, rtx target, int ignore) ...@@ -3134,7 +3134,9 @@ expand_call (tree exp, rtx target, int ignore)
int arg_nr = return_flags & ERF_RETURN_ARG_MASK; int arg_nr = return_flags & ERF_RETURN_ARG_MASK;
if (PUSH_ARGS_REVERSED) if (PUSH_ARGS_REVERSED)
arg_nr = num_actuals - arg_nr - 1; arg_nr = num_actuals - arg_nr - 1;
if (args[arg_nr].reg if (arg_nr >= 0
&& arg_nr < num_actuals
&& args[arg_nr].reg
&& valreg && valreg
&& REG_P (valreg) && REG_P (valreg)
&& GET_MODE (args[arg_nr].reg) == GET_MODE (valreg)) && GET_MODE (args[arg_nr].reg) == GET_MODE (valreg))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment