+2017-10-30 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/82725
+ * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
+ UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
+
2017-10-29 Jim Wilson <wilson@tuliptree.org>
* gimplify.c: Include tm_p.h.
break;
op0 = XEXP (XEXP (disp, 0), 0);
op1 = XEXP (XEXP (disp, 0), 1);
- if (!CONST_INT_P (op1)
- || INTVAL (op1) >= 16*1024*1024
+ if (!CONST_INT_P (op1))
+ break;
+ if (GET_CODE (op0) == UNSPEC
+ && (XINT (op0, 1) == UNSPEC_DTPOFF
+ || XINT (op0, 1) == UNSPEC_NTPOFF)
+ && trunc_int_for_mode (INTVAL (op1), SImode) == INTVAL (op1))
+ return true;
+ if (INTVAL (op1) >= 16*1024*1024
|| INTVAL (op1) < -16*1024*1024)
- break;
+ break;
if (GET_CODE (op0) == LABEL_REF)
return true;
if (GET_CODE (op0) == CONST
+2017-10-30 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/82725
+ * g++.dg/pr82725.C: New test.
+
2017-10-29 Jim Wilson <wilson@tuliptree.org>
* lib/gcc-dg.exp (gcc-dg-debug-runtest): Delete -gcoff.
- * lib/gfortran-dg.exp (gfortran-dg-debug-runtest): Delete
- -gcoff.
+ * lib/gfortran-dg.exp (gfortran-dg-debug-runtest): Delete -gcoff.
2017-10-28 Paolo Carlini <paolo.carlini@oracle.com>
--- /dev/null
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target pie }
+// { dg-options "-O2 -fpie -mtls-direct-seg-refs" }
+
+struct string
+{
+ __SIZE_TYPE__ length;
+ const char *ptr;
+};
+
+string
+tempDir ()
+{
+ thread_local string cache;
+ return cache;
+}