aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@codesourcery.com>2007-07-01 21:15:14 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2007-07-01 21:15:14 +0000
commit10ae7c7b78beed4a5d924ec89371ecb0b0a9a367 (patch)
tree69a4c8dfbaa4c8ec2fe6ddfd5115e39d98bc15f1 /gcc/testsuite/gcc.dg/tls
parentaf92ab368ad709fcd26b360dc1cf4e50b0cd6185 (diff)
downloadgcc-10ae7c7b78beed4a5d924ec89371ecb0b0a9a367.zip
gcc-10ae7c7b78beed4a5d924ec89371ecb0b0a9a367.tar.gz
gcc-10ae7c7b78beed4a5d924ec89371ecb0b0a9a367.tar.bz2
arm.c (arm_cannot_copy_insn_p): Do not expect a PARALLEL.
* config/arm/arm.c (arm_cannot_copy_insn_p): Do not expect a PARALLEL. * config/arm/arm.md (pic_add_dot_plus_four, pic_add_dot_plus_eight) (tls_load_dot_plus_eight): Move the label number into the unspec. * config/arm/thumb2.md (pic_load_dot_plus_four): Likewise. * gcc.dg/tls/opt-14.c: New. From-SVN: r126178
Diffstat (limited to 'gcc/testsuite/gcc.dg/tls')
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-14.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tls/opt-14.c b/gcc/testsuite/gcc.dg/tls/opt-14.c
new file mode 100644
index 0000000..5abeace
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tls/opt-14.c
@@ -0,0 +1,28 @@
+/* This testcase generated invalid assembly on ARM Thumb-2. Two
+ PIC additions of pc were combined, but the deleted label was still
+ used. */
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target tls } */
+
+struct __res_state
+{
+ int options;
+};
+extern __thread struct __res_state *__resp
+ __attribute__ ((tls_model ("initial-exec")));
+
+void foo (void);
+
+int main(void)
+{
+ int count, total = 0;
+
+ for (count = 0; count < 10; count++)
+ {
+ if (((*__resp).options & 0x00000001) == 0)
+ foo ();
+ (*__resp).options &= ~((0x00000002 | 0x00000200 | 0x00000080));
+ }
+ return 0;
+}