From de0dd9345e332148fc17daed7fd02edebf64eebb Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Sun, 15 Nov 1998 20:43:19 +0000 Subject: [PATCH] function.c (purge_addressof_1): Unshare rtl created by store_bit_field. * function.c (purge_addressof_1): Unshare rtl created by store_bit_field. From-SVN: r23670 --- gcc/ChangeLog | 5 +++++ gcc/function.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 808cad83b43..25d7e176dc6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 16 04:41:41 1998 J"orn Rennecke + + * function.c (purge_addressof_1): Unshare rtl created by + store_bit_field. + Mon Nov 16 04:23:06 1998 J"orn Rennecke * regmove.c (regmove_optimize): Don't do anything but diff --git a/gcc/function.c b/gcc/function.c index 44accb85a0d..3f4784896da 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2918,6 +2918,8 @@ purge_addressof_1 (loc, insn, force, store) if (store) { + rtx p; + start_sequence (); val = gen_reg_rtx (GET_MODE (x)); if (! validate_change (insn, loc, val, 0)) @@ -2936,6 +2938,16 @@ purge_addressof_1 (loc, insn, force, store) val, GET_MODE_SIZE (GET_MODE (sub)), GET_MODE_SIZE (GET_MODE (sub))); + /* Make sure to unshare any shared rtl that store_bit_field + might have created. */ + for (p = get_insns(); p; p = NEXT_INSN (p)) + { + reset_used_flags (PATTERN (p)); + reset_used_flags (REG_NOTES (p)); + reset_used_flags (LOG_LINKS (p)); + } + unshare_all_rtl (get_insns ()); + seq = gen_sequence (); end_sequence (); emit_insn_after (seq, insn);