summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/c-c++-common/gomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-27 13:44:10 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-27 13:44:10 +0000
commitfc33577d2d1e4a8adcf9df53d869fdad1cd49d84 (patch)
tree397b9bfaf3b6c235b4e2f991fd202f64d3ef1996 /gcc/testsuite/c-c++-common/gomp
parent2de52d0943f1289663e9190a0108b799e0e82976 (diff)
downloadppe42-gcc-fc33577d2d1e4a8adcf9df53d869fdad1cd49d84.tar.gz
ppe42-gcc-fc33577d2d1e4a8adcf9df53d869fdad1cd49d84.zip
PR middle-end/58551
* tree-cfg.c (move_sese_region_to_fn): Also move loops that are children of outermost saved_cfun's loop, and set it up to be moved to dest_cfun's outermost loop. Fix up num_nodes adjustments if loop != loop0 and SESE region contains bbs that belong to loop0. * c-c++-common/gomp/pr58551.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common/gomp')
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr58551.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/pr58551.c b/gcc/testsuite/c-c++-common/gomp/pr58551.c
new file mode 100644
index 00000000000..e2db70f9e86
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr58551.c
@@ -0,0 +1,33 @@
+/* PR middle-end/58551 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -fopenmp" } */
+
+void
+foo (int *a)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ #pragma omp task
+ if (a[i])
+ __builtin_abort ();
+}
+
+void bar (int, int);
+
+void
+baz (int *a)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ #pragma omp task
+ if (a[i])
+ {
+ int j, k;
+ for (j = 0; j < 10; j++)
+ for (k = 0; k < 8; k++)
+ bar (j, k);
+ for (k = 0; k < 12; k++)
+ bar (-1, k);
+ __builtin_abort ();
+ }
+}
OpenPOWER on IntegriCloud