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>
* doc/extend.texi (X86 Built-in Functions): Add whitespace in
......
......@@ -3134,7 +3134,9 @@ expand_call (tree exp, rtx target, int ignore)
int arg_nr = return_flags & ERF_RETURN_ARG_MASK;
if (PUSH_ARGS_REVERSED)
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
&& REG_P (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