re PR fortran/29759 (ice on line continuation in OMP statements (gfc_next_char_literal, at fortran/scanner.c:701))

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
This commit is contained in:
Jakub Jelinek 2006-11-13 20:42:55 +01:00 committed by Jakub Jelinek
parent e7d459bd0b
commit b30c6a0d21
4 changed files with 54 additions and 0 deletions

View 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

View file

@ -392,6 +392,7 @@ skip_free_comments (void)
{
gfc_current_locus = old_loc;
next_char ();
openmp_flag = 0;
return true;
}
}

View 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

View file

@ -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