OSDN Git Service

* config/sh/sh.c (nonpic_symbol_mentioned_p): Allow UNSPEC_TPOFF.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Oct 2009 15:16:24 +0000 (15:16 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Oct 2009 15:16:24 +0000 (15:16 +0000)
testsuite:
* gcc.dg/tls/pie-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153060 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tls/pie-1.c [new file with mode: 0644]

index dc8d593..cf2bc8f 100644 (file)
@@ -1,3 +1,7 @@
+2009-10-21  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/sh/sh.c (nonpic_symbol_mentioned_p): Allow UNSPEC_TPOFF.
+
 2009-10-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR other/25507
index 7758bfa..26bceea 100644 (file)
@@ -9431,6 +9431,7 @@ nonpic_symbol_mentioned_p (rtx x)
          || XINT (x, 1) == UNSPEC_GOTPLT
          || XINT (x, 1) == UNSPEC_GOTTPOFF
          || XINT (x, 1) == UNSPEC_DTPOFF
+         || XINT (x, 1) == UNSPEC_TPOFF
          || XINT (x, 1) == UNSPEC_PLT
          || XINT (x, 1) == UNSPEC_SYMOFF
          || XINT (x, 1) == UNSPEC_PCREL_SYMOFF))
index b1c3fdc..ec986f3 100644 (file)
@@ -1,3 +1,7 @@
+2009-10-21  Joseph Myers  <joseph@codesourcery.com>
+
+       * gcc.dg/tls/pie-1.c: New test.
+
 2009-10-21  Jakub Jelinek  <jakub@redhat.com>
 
        * g++.dg/abi/mangle33.C: New test.
diff --git a/gcc/testsuite/gcc.dg/tls/pie-1.c b/gcc/testsuite/gcc.dg/tls/pie-1.c
new file mode 100644 (file)
index 0000000..07eb5f1
--- /dev/null
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-fpie" } */
+/* { dg-require-effective-target tls } */
+
+__thread int a; int b; int main() { return a = b; }