Commit 006e317a by Jan Hubicka Committed by Jan Hubicka

re PR ipa/65540 (internal error on s-fatllf.ads at -O2)

 	PR ipa/65540
	* calls.c (initialize_argument_information): When producing tail
	call also turn SSA_NAMES passed by references to original PARM_DECLs
	* gcc.c-torture/compile/pr65540.c: New.

From-SVN: r221910
parent 4209b6d0
2015-04-07 Jan Hubicka <hubicka@ucw.cz>
PR ipa/65540
* calls.c (initialize_argument_information): When producing tail
call also turn SSA_NAMES passed by references to original PARM_DECLs
2015-04-07 Vladimir Makarov <vmakarov@redhat.com> 2015-04-07 Vladimir Makarov <vmakarov@redhat.com>
PR target/65648 PR target/65648
......
...@@ -1321,6 +1321,15 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, ...@@ -1321,6 +1321,15 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
&& TREE_CODE (base) != SSA_NAME && TREE_CODE (base) != SSA_NAME
&& (!DECL_P (base) || MEM_P (DECL_RTL (base))))) && (!DECL_P (base) || MEM_P (DECL_RTL (base)))))
{ {
/* We may have turned the parameter value into an SSA name.
Go back to the original parameter so we can take the
address. */
if (TREE_CODE (args[i].tree_value) == SSA_NAME)
{
gcc_assert (SSA_NAME_IS_DEFAULT_DEF (args[i].tree_value));
args[i].tree_value = SSA_NAME_VAR (args[i].tree_value);
gcc_assert (TREE_CODE (args[i].tree_value) == PARM_DECL);
}
/* Argument setup code may have copied the value to register. We /* Argument setup code may have copied the value to register. We
revert that optimization now because the tail call code must revert that optimization now because the tail call code must
use the original location. */ use the original location. */
......
2015-04-07 Jan Hubicka <hubicka@ucw.cz>
PR ipa/65540
* gcc.c-torture/compile/pr65540.c: New.
2015-04-07 Alan Lawrence <alan.lawrence@arm.com> 2015-04-07 Alan Lawrence <alan.lawrence@arm.com>
* gcc.target/aarch64/c-output-template-3.c: Add -O, remove * gcc.target/aarch64/c-output-template-3.c: Add -O, remove
......
long double func1 (long double x)
{
if (x > 0.0)
return x;
else if (x < 0.0)
return -x;
else
return x;
}
long double func2 (long double x)
{
if (x > 0.0)
return x;
else if (x < 0.0)
return -x;
else
return x;
}
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