Index: gcc/gcc/config/i386/i386.c =================================================================== --- gcc.orig/gcc/config/i386/i386.c +++ gcc/gcc/config/i386/i386.c @@ -7673,9 +7673,6 @@ legitimize_address (rtx x, rtx oldx ATTR return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (x, 0), 1)); } - if (flag_pic && SYMBOLIC_CONST (x)) - return legitimize_pic_address (x, 0); - if (TARGET_DLLIMPORT_DECL_ATTRIBUTES) { if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_DLLIMPORT_P (x)) @@ -7690,6 +7687,9 @@ legitimize_address (rtx x, rtx oldx ATTR } } + if (flag_pic && SYMBOLIC_CONST (x)) + return legitimize_pic_address (x, 0); + /* Canonicalize shifts by 0, 1, 2, 3 into multiply */ if (GET_CODE (x) == ASHIFT && CONST_INT_P (XEXP (x, 1)) =