aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-10-06 09:14:48 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-10-06 09:14:48 +0000
commit68ea7618de28a52f5a8db9850f162614c8a0c4b5 (patch)
tree1b1ac982891ae3f01daba67c0e08ad2ab1f543b8 /gcc/config/sparc
parent4a2fc4d45e40980f75fd8c9936cda1ecf9ae2241 (diff)
downloadgcc-68ea7618de28a52f5a8db9850f162614c8a0c4b5.zip
gcc-68ea7618de28a52f5a8db9850f162614c8a0c4b5.tar.gz
gcc-68ea7618de28a52f5a8db9850f162614c8a0c4b5.tar.bz2
re PR c/65345 (ICE with _Generic selection on _Atomic int)
PR c/65345 * config/sparc/sparc.c (sparc_atomic_assign_expand_fenv): Adjust to use create_tmp_var_raw rather than create_tmp_var. From-SVN: r228516
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r--gcc/config/sparc/sparc.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index a0adf22..d9c5c66 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -12540,20 +12540,23 @@ sparc_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
__builtin_load_fsr (&tmp1_var); */
- tree fenv_var = create_tmp_var (unsigned_type_node);
- mark_addressable (fenv_var);
+ tree fenv_var = create_tmp_var_raw (unsigned_type_node);
+ TREE_ADDRESSABLE (fenv_var) = 1;
tree fenv_addr = build_fold_addr_expr (fenv_var);
tree stfsr = sparc_builtins[SPARC_BUILTIN_STFSR];
- tree hold_stfsr = build_call_expr (stfsr, 1, fenv_addr);
+ tree hold_stfsr
+ = build4 (TARGET_EXPR, unsigned_type_node, fenv_var,
+ build_call_expr (stfsr, 1, fenv_addr), NULL_TREE, NULL_TREE);
- tree tmp1_var = create_tmp_var (unsigned_type_node);
- mark_addressable (tmp1_var);
+ tree tmp1_var = create_tmp_var_raw (unsigned_type_node);
+ TREE_ADDRESSABLE (tmp1_var) = 1;
tree masked_fenv_var
= build2 (BIT_AND_EXPR, unsigned_type_node, fenv_var,
build_int_cst (unsigned_type_node,
~(accrued_exception_mask | trap_enable_mask)));
tree hold_mask
- = build2 (MODIFY_EXPR, void_type_node, tmp1_var, masked_fenv_var);
+ = build4 (TARGET_EXPR, unsigned_type_node, tmp1_var, masked_fenv_var,
+ NULL_TREE, NULL_TREE);
tree tmp1_addr = build_fold_addr_expr (tmp1_var);
tree ldfsr = sparc_builtins[SPARC_BUILTIN_LDFSR];
@@ -12578,10 +12581,12 @@ sparc_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
tmp2_var >>= 5;
__atomic_feraiseexcept ((int) tmp2_var); */
- tree tmp2_var = create_tmp_var (unsigned_type_node);
- mark_addressable (tmp2_var);
- tree tmp3_addr = build_fold_addr_expr (tmp2_var);
- tree update_stfsr = build_call_expr (stfsr, 1, tmp3_addr);
+ tree tmp2_var = create_tmp_var_raw (unsigned_type_node);
+ TREE_ADDRESSABLE (tmp2_var) = 1;
+ tree tmp2_addr = build_fold_addr_expr (tmp2_var);
+ tree update_stfsr
+ = build4 (TARGET_EXPR, unsigned_type_node, tmp2_var,
+ build_call_expr (stfsr, 1, tmp2_addr), NULL_TREE, NULL_TREE);
tree update_ldfsr = build_call_expr (ldfsr, 1, fenv_addr);