summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-19 14:02:32 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-19 14:02:32 +0000
commitd244d9de1519a228c963cc2e70b29e842aee2ace (patch)
treeb2ceb968dce32746620d8c2755e65d81bba8a568 /gcc/testsuite/c-c++-common
parentbc22be57958f14d3d43c41cd89959d97c808fb2e (diff)
downloadgcc-d244d9de1519a228c963cc2e70b29e842aee2ace.tar.gz
PR middle-end/54017
* tree-cfgcleanup.c (cleanup_omp_return): Remove. (cleanup_tree_cfg_bb): Don't call it. * omp-low.c (expand_omp_sections): Fix up the !exit_reachable case handling. * c-c++-common/gomp/pr54017.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189658 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common')
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr54017.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/pr54017.c b/gcc/testsuite/c-c++-common/gomp/pr54017.c
new file mode 100644
index 00000000000..724efe13638
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr54017.c
@@ -0,0 +1,65 @@
+/* PR middle-end/54017 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+f1 (void)
+{
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+ for (;;)
+ ;
+ }
+ }
+}
+
+int
+f2 (void)
+{
+ int i = 0;
+#pragma omp parallel
+#pragma omp sections reduction(+:i)
+ {
+#pragma omp section
+ {
+ for (;;)
+ ;
+ }
+ }
+ return i;
+}
+
+void
+f3 (void)
+{
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+ for (;;)
+ ;
+ }
+#pragma omp section
+ ;
+ }
+}
+
+int
+f4 (void)
+{
+ int i = 0;
+#pragma omp parallel
+#pragma omp sections reduction(+:i)
+ {
+#pragma omp section
+ {
+ for (;;)
+ ;
+ }
+#pragma omp section
+ ;
+ }
+ return i;
+}