re PR tree-optimization/56424 (ICE at tree-inline.c:2833 on a-nllcef.ads at -O2)

PR tree-optimization/56424
	* ipa-split.c (split_function): Do not set the RSO flag if result is
	not by reference and its type is a register type.

From-SVN: r196439
This commit is contained in:
Eric Botcazou 2013-03-04 17:41:32 +00:00 committed by Eric Botcazou
parent e5cb02e200
commit 22110e6c57
4 changed files with 46 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/56424
* ipa-split.c (split_function): Do not set the RSO flag if result is
not by reference and its type is a register type.
2013-03-04 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.c (microblaze_valid_pic_const): New

View File

@ -1309,7 +1309,9 @@ split_function (struct split_point *split_point)
so return slot optimization is always possible. Moreover this is
required to make DECL_BY_REFERENCE work. */
if (aggregate_value_p (DECL_RESULT (current_function_decl),
TREE_TYPE (current_function_decl)))
TREE_TYPE (current_function_decl))
&& (!is_gimple_reg_type (TREE_TYPE (DECL_RESULT (current_function_decl)))
|| DECL_BY_REFERENCE (DECL_RESULT (current_function_decl))))
gimple_call_set_return_slot_opt (call, true);
/* Update return value. This is bit tricky. When we do not return,

View File

@ -1,3 +1,7 @@
2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/pr56424.c: New test.
2013-03-04 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/pr55153.c: Add dg-require-effective-target scheduling.

View File

@ -0,0 +1,33 @@
/* PR tree-optimization/56424 */
/* { dg-do compile } */
/* { dg-options "-O2 -fexceptions -fnon-call-exceptions" } */
extern long double cosl (long double);
extern long double sinl (long double);
extern long double reml (long double, long double);
long double my_cos (long double arg)
{
return cosl (arg);
}
long double my_sin (long double arg)
{
if (__builtin_fabs (arg) < 1.0)
return arg;
return sinl (arg);
}
long double my_cot (long double arg, long double cycle)
{
long double t = reml (arg, cycle);
return my_cos (t) / my_sin (t);
}
long double my_tan (long double arg, long double cycle)
{
long double t = reml (arg, cycle);
return my_sin (t) / my_cos (t);
}