summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-08 18:47:54 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-08 18:47:54 +0000
commit3809b03c4f968d2b77117684da0c4af9d256d137 (patch)
tree2cd69c5e36666ee9b948247a6efa48eef6cbc59d /gcc/cfgexpand.c
parent2642acab2986f8ad63b82c0a583b43df9bbb816b (diff)
downloadgcc-3809b03c4f968d2b77117684da0c4af9d256d137.tar.gz
PR middle-end/68291
PR middle-end/68292 * cfgexpand.c (set_rtl): Always accept mode mismatch for SSA names with BLKmode promoted mode based on RESULT_DECLs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 5338c251b46..7fe02a900bc 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -203,11 +203,14 @@ set_rtl (tree t, rtx x)
PARM_DECLs and RESULT_DECLs, we'll have been called by
set_parm_rtl, which will give us the default def, so we don't
have to compute it ourselves. For RESULT_DECLs, we accept mode
- mismatches too, as long as we're not coalescing across variables,
- so that we don't reject BLKmode PARALLELs or unpromoted REGs. */
+ mismatches too, as long as we have BLKmode or are not coalescing
+ across variables, so that we don't reject BLKmode PARALLELs or
+ unpromoted REGs. */
gcc_checking_assert (!x || x == pc_rtx || TREE_CODE (t) != SSA_NAME
- || (SSAVAR (t) && TREE_CODE (SSAVAR (t)) == RESULT_DECL
- && !flag_tree_coalesce_vars)
+ || (SSAVAR (t)
+ && TREE_CODE (SSAVAR (t)) == RESULT_DECL
+ && (promote_ssa_mode (t, NULL) == BLKmode
+ || !flag_tree_coalesce_vars))
|| !use_register_for_decl (t)
|| GET_MODE (x) == promote_ssa_mode (t, NULL));