@@ -42039,7 +42039,8 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total,
&& !(TARGET_64BIT
&& (GET_CODE (x) == LABEL_REF
|| (GET_CODE (x) == SYMBOL_REF
- && SYMBOL_REF_LOCAL_P (x)))))
+ && SYMBOL_REF_LOCAL_P (x))))
+ && (TARGET_64BIT || GET_CODE (x) != CONST))
*total = 1;
else
*total = 0;
new file mode 100644
@@ -0,0 +1,18 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-m32 -O2 -fPIE" } */
+/* { dg-final { scan-assembler-not "GOTOFF," } } */
+
+static int *data[100];
+
+void test (long a, long b)
+{
+ do
+ {
+ if( a < b )
+ {
+ data[a] = data[b];
+ a++;
+ }
+ }
+ while (a <= b);
+}