re PR tree-optimization/44687 (ICE: in tree_nrv, at tree-nrv.c:155 with -fprofile-generate)

PR tree-optimization/44687
	* gcc.c-torture/compile/pr44687.c
	PR tree-optimization/44687
	* ipa-split.c (split_function): Use DECL_RESULT to store return value.

From-SVN: r161500
This commit is contained in:
Jan Hubicka 2010-06-28 17:51:25 +02:00 committed by Jan Hubicka
parent 621f418948
commit 4021f4a171
4 changed files with 43 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-06-28 Jan Hubicka <jh@suse.cz>
PR tree-optimization/44687
* ipa-split.c (split_function): Use DECL_RESULT to store return value.
2010-06-28 Martin Jambor <mjambor@suse.cz>
PR c++/44535

View File

@ -928,9 +928,7 @@ split_function (struct split_point *split_point)
gimple ret;
if (!VOID_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl))))
{
retval
= create_tmp_var (TREE_TYPE (TREE_TYPE (current_function_decl)),
"RET");
retval = DECL_RESULT (current_function_decl);
if (is_gimple_reg (retval))
retval = make_ssa_name (retval, call);
gimple_call_set_lhs (call, retval);

View File

@ -1,3 +1,8 @@
2010-06-28 Jan Hubicka <jh@suse.cz>
PR tree-optimization/44687
* gcc.c-torture/compile/pr44687.c
2010-06-28 Martin Jambor <mjambor@suse.cz>
PR c++/44535

View File

@ -0,0 +1,32 @@
typedef int int32_t;
typedef unsigned char uint8_t;
struct S0
{
uint8_t f0;
};
struct S0 *g_18[7][5][1][1] = {
};
struct S0 **g_17 = &g_18[0][3][0][0];
int32_t g_86;
struct S0 func_72 (uint8_t p_73, struct S0 p_74);
void int326 (struct S0 **p_67, int32_t p_68, int32_t * *const p_69,
struct S0 *p_70)
{
struct S0 l_95 = {
-1L
};
func_72 (1L, func_72 (0, l_95));
}
struct S0
func_72 (uint8_t p_73, struct S0 p_74)
{
int32_t *l_85 = &g_86;
if (*l_85)
lbl_94:*l_85 ^= 0;
if (g_86)
goto lbl_94;
return **g_17;
}