From: Kaz Kojima Date: Mon, 5 Oct 2015 22:18:05 +0000 (+0000) Subject: Fix PR65345 in SH backend X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c286398e0a815c86b9aaf73ace6acf462235a87;p=gcc.git Fix PR65345 in SH backend Adjust to use create_tmp_var_raw rather than create_tmp_var at sh_atomic_assign_expand_fenv. From-SVN: r228502 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d63f321612d..1007bd9a333 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-10-05 Kaz Kojima + + PR c/65345 + * config/sh/sh.c (sh_atomic_assign_expand_fenv): Adjust to use + create_tmp_var_raw rather than create_tmp_var. + 2015-10-05 Marek Polacek * tree-ssa-loop-im.c diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 92e9f9f902c..54da3386ff7 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -12106,7 +12106,7 @@ sh_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) __builtin_sh_set_fpscr (masked_fenv); */ - fenv_var = create_tmp_var (unsigned_type_node); + fenv_var = create_tmp_var_raw (unsigned_type_node); mask = build_int_cst (unsigned_type_node, ~((SH_FE_ALL_EXCEPT << SH_FE_EXCEPT_SHIFT) | SH_FE_ALL_EXCEPT)); @@ -12114,9 +12114,11 @@ sh_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) fenv_var, build_call_expr (sh_builtin_get_fpscr, 0)); masked_fenv = build2 (BIT_AND_EXPR, unsigned_type_node, fenv_var, mask); hold_fnclex = build_call_expr (sh_builtin_set_fpscr, 1, masked_fenv); - *hold = build2 (COMPOUND_EXPR, void_type_node, - build2 (COMPOUND_EXPR, void_type_node, masked_fenv, ld_fenv), - hold_fnclex); + fenv_var = build4 (TARGET_EXPR, unsigned_type_node, fenv_var, + build2 (COMPOUND_EXPR, void_type_node, masked_fenv, + ld_fenv), + NULL_TREE, NULL_TREE); + *hold = build2 (COMPOUND_EXPR, void_type_node, fenv_var, hold_fnclex); /* Store the value of masked_fenv to clear the exceptions: __builtin_sh_set_fpscr (masked_fenv); */ @@ -12131,7 +12133,7 @@ sh_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) __atomic_feraiseexcept (new_fenv_var); */ - new_fenv_var = create_tmp_var (unsigned_type_node); + new_fenv_var = create_tmp_var_raw (unsigned_type_node); reload_fenv = build2 (MODIFY_EXPR, unsigned_type_node, new_fenv_var, build_call_expr (sh_builtin_get_fpscr, 0)); restore_fnenv = build_call_expr (sh_builtin_set_fpscr, 1, fenv_var);