]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add a test for PR middle-end/53249
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 May 2012 13:32:13 +0000 (13:32 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 May 2012 13:32:13 +0000 (13:32 +0000)
PR middle-end/53249
* gcc.target/i386/pr53249.c: New.

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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr53249.c [new file with mode: 0644]

index 00999072e34556285b62b47b256dbf30d3861fa8..06c1f9d852afa1dab732007b27de4ac450e653e2 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR middle-end/53249
+       * gcc.target/i386/pr53249.c: New.
+
 2012-05-09  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/18437
diff --git a/gcc/testsuite/gcc.target/i386/pr53249.c b/gcc/testsuite/gcc.target/i386/pr53249.c
new file mode 100644 (file)
index 0000000..9eab8bc
--- /dev/null
@@ -0,0 +1,25 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32 -ftls-model=initial-exec -maddress-mode=short" } */
+
+struct gomp_task
+{
+  struct gomp_task *parent;
+};
+
+struct gomp_thread
+{
+  int foo1;
+  struct gomp_task *task;
+};
+
+extern __thread struct gomp_thread gomp_tls_data;
+
+void
+__attribute__ ((noinline))
+gomp_end_task (void)
+{
+  struct gomp_thread *thr = &gomp_tls_data;
+  struct gomp_task *task = thr->task;
+
+  thr->task = task->parent;
+}