]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/29759 (ice on line continuation in OMP statements (gfc_next_char_litera...
authorJakub Jelinek <jakub@redhat.com>
Mon, 13 Nov 2006 19:42:55 +0000 (20:42 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 13 Nov 2006 19:42:55 +0000 (20:42 +0100)
PR fortran/29759
* fortran/scanner.c (skip_free_comments): Clear openmp_flag
before returning true.

* gfortran.dg/gomp/pr29759.f90: New test.

From-SVN: r118773

gcc/fortran/ChangeLog
gcc/fortran/scanner.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr29759.f90 [new file with mode: 0644]

index 3cd8b11641f3bb8a85fe6f60905e729c9e5a8cd4..2ba9e874c96e095b39c4ed842faf010828fe48be 100644 (file)
@@ -1,3 +1,9 @@
+2006-11-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/29759
+       * fortran/scanner.c (skip_free_comments): Clear openmp_flag
+       before returning true.
+
 2006-11-12  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR fortran/26994
index 9d0ba2a492be7d4dfff157b72350dfbfe0bde3a8..b05490409b124af398aa8a1f0d192c904dab06e9 100644 (file)
@@ -392,6 +392,7 @@ skip_free_comments (void)
                    {
                      gfc_current_locus = old_loc;
                      next_char ();
+                     openmp_flag = 0;
                      return true;
                    }
                }
index 88f8c59bdf6588be9ba208d3a431fdf71b7ec0ae..b058a6df9428d85830f93801635f9cef8e7893d6 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/29759
+       * gfortran.dg/gomp/pr29759.f90: New test.
+
 2006-11-13  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/29518
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr29759.f90 b/gcc/testsuite/gfortran.dg/gomp/pr29759.f90
new file mode 100644 (file)
index 0000000..19a19c9
--- /dev/null
@@ -0,0 +1,42 @@
+! PR fortran/29759
+! { dg-do compile }
+
+PROGRAM test_omp
+!$OMP PARALLEL &
+!$OMP NUM_THREADS(2)
+!$OMP END PARALLEL
+
+!$OMP PARALLEL &
+!$OMP & NUM_THREADS(2)
+!$OMP END PARALLEL
+
+!$OMP PARALLEL &
+!
+!$OMP NUM_THREADS(2)
+!$OMP END PARALLEL
+
+!$OMP PARALLEL &
+!
+!$OMP & NUM_THREADS(2)
+!$OMP END PARALLEL
+
+
+!$OMP PARALLEL &               ! { dg-error "Unclassifiable OpenMP" }
+!$    NUM_THREADS(2)           ! { dg-error "Unclassifiable" }
+!$OMP END PARALLEL             ! { dg-error "Unexpected" }
+
+!$OMP PARALLEL &               ! { dg-error "Unclassifiable OpenMP" }
+!$    & NUM_THREADS(2)         ! { dg-error "Unclassifiable" }
+!$OMP END PARALLEL             ! { dg-error "Unexpected" }
+
+!$OMP PARALLEL &               ! { dg-error "Unclassifiable OpenMP" }
+!
+!$    NUM_THREADS(2)           ! { dg-error "Unclassifiable" }
+!$OMP END PARALLEL             ! { dg-error "Unexpected" }
+
+!$OMP PARALLEL &               ! { dg-error "Unclassifiable OpenMP" }
+!
+!$    & NUM_THREADS(2)         ! { dg-error "Unclassifiable" }
+!$OMP END PARALLEL             ! { dg-error "Unexpected" }
+
+END PROGRAM
This page took 0.151454 seconds and 5 git commands to generate.