summaryrefslogtreecommitdiffstats
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-03-26 23:51:11 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-03-26 23:51:11 +0000
commit584afddadde2174d7fad07e59a7c7f7ff9697503 (patch)
tree0a29b4dc71dd63cac1c341fe037ab31ad9d3d658 /gcc/regclass.c
parenta5e95c307642b849e13eecc0ef039c01a38b391c (diff)
downloadppe42-gcc-584afddadde2174d7fad07e59a7c7f7ff9697503.tar.gz
ppe42-gcc-584afddadde2174d7fad07e59a7c7f7ff9697503.zip
* regclass.c (reg_scan_mark_refs): Be more selective about
when we mark a register with REGNO_POINTER_FLAG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 396222b7192..e964e99a82c 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1919,6 +1919,12 @@ reg_scan_mark_refs (x, insn, note_flag)
if (GET_CODE (SET_DEST (x)) == REG
&& REGNO (SET_DEST (x)) >= FIRST_PSEUDO_REGISTER
+ /* If the destination pseudo is set more than once, then other
+ sets might not be to a pointer value (consider access to a
+ union in two threads of control in the presense of global
+ optimizations). So only set REGNO_POINTER_FLAG on the destination
+ pseudo if this is the only set of that pseudo. */
+ && REG_N_SETS (REGNO (SET_DEST (x))) == 1
&& ! REG_USERVAR_P (SET_DEST (x))
&& ! REGNO_POINTER_FLAG (REGNO (SET_DEST (x)))
&& ((GET_CODE (SET_SRC (x)) == REG
OpenPOWER on IntegriCloud