diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 14:20:57 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 14:20:57 +0000 |
commit | 79112414239490d11c9bf27ff3af14a4fd75169a (patch) | |
tree | ca7d1c74fc1a4a59a83a6080cb466e3998beb348 /gcc/fortran/scanner.c | |
parent | c26dea60ba52d92e36683bf1d649899a823eceee (diff) | |
download | gcc-79112414239490d11c9bf27ff3af14a4fd75169a.tar.gz |
2007-09-22 Tobias Burnus <burnus@net-b.de>
PR fortran/33445
* scanner.c (skip_free_comments): Warn if !$OMP& is used
if no OpenMP directive is to be continued.
2007-09-22 Tobias Burnus <burnus@net-b.de>
PR fortran/33445
* gfortran.dg/gomp/free-2.f90: New.
* gfortran.dg/gomp/appendix-a/a.31.1.f90: Add missing &.
* gfortran.dg/gomp/omp_parse1.f90: Add dg-warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128670 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/scanner.c')
-rw-r--r-- | gcc/fortran/scanner.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index b0c7979554e..fe7d213ae0b 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -417,18 +417,25 @@ skip_free_comments (void) if (c == 'o' || c == 'O') { if (((c = next_char ()) == 'm' || c == 'M') - && ((c = next_char ()) == 'p' || c == 'P') - && ((c = next_char ()) == ' ' || continue_flag)) + && ((c = next_char ()) == 'p' || c == 'P')) { - while (gfc_is_whitespace (c)) - c = next_char (); - if (c != '\n' && c != '!') + if ((c = next_char ()) == ' ' || continue_flag) { - openmp_flag = 1; - openmp_locus = old_loc; - gfc_current_locus = start; - return false; + while (gfc_is_whitespace (c)) + c = next_char (); + if (c != '\n' && c != '!') + { + openmp_flag = 1; + openmp_locus = old_loc; + gfc_current_locus = start; + return false; + } } + else + gfc_warning_now ("!$OMP at %C starts a commented " + "line as it neither is followed " + "by a space nor is a " + "continuation line"); } gfc_current_locus = old_loc; next_char (); |