From d865ed7227a98bc1229d6e42bca35f605d6f4f75 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 20 Sep 2019 06:42:39 +0000 Subject: [PATCH] re PR target/91767 (After r274953, clang-compiled xgcc segfaults during RTL pass: stv) 2019-09-20 Richard Biener PR target/91767 * config/i386/i386-features.c (general_scalar_chain::convert_registers): Ensure there's a sequence point between allocating the new register and passing a reference to a reg via regno_reg_rtx. From-SVN: r275989 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386-features.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f34d1a90c4..31dd2068bfa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-09-20 Richard Biener + + PR target/91767 + * config/i386/i386-features.c (general_scalar_chain::convert_registers): + Ensure there's a sequence point between allocating the new register + and passing a reference to a reg via regno_reg_rtx. + 2019-09-20 Martin Jambor * coretypes.h (cgraph_edge): Declare. diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index f57a5555f8f..546d78d99b5 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -1210,7 +1210,10 @@ general_scalar_chain::convert_registers () bitmap_iterator bi; unsigned id; EXECUTE_IF_SET_IN_BITMAP (defs_conv, 0, id, bi) - defs_map.put (regno_reg_rtx[id], gen_reg_rtx (smode)); + { + rtx chain_reg = gen_reg_rtx (smode); + defs_map.put (regno_reg_rtx[id], chain_reg); + } EXECUTE_IF_SET_IN_BITMAP (insns_conv, 0, id, bi) for (df_ref ref = DF_INSN_UID_DEFS (id); ref; ref = DF_REF_NEXT_LOC (ref)) if (bitmap_bit_p (defs_conv, DF_REF_REGNO (ref))) -- 2.30.2