diff mbox

[Powerpc/Darwin,committed] fix PR45233

Message ID 8EA1D989-DA71-4B22-85CA-30438A176C41@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Nov. 12, 2011, 2:17 p.m. UTC
OK'd by Mike in the PR thread.
Applied to trunk and 4.6
Iain

gcc:

	PR target/45233
	* config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
	Only expand a symbol ref. into an access when the entity is defined
	in the TU.

  	PR bootstrap/50822
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 181311)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -6169,6 +6169,7 @@  rs6000_legitimize_reload_address (rtx x, enum mach
  #if TARGET_MACHO
        && DEFAULT_ABI == ABI_DARWIN
        && (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
+      && machopic_symbol_defined_p (x)
  #else
        && DEFAULT_ABI == ABI_V4
        && !flag_pic