diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-07-28 18:15:47 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-07-28 18:15:47 +0200 |
commit | 394a5b34b1c35ef8aae0b6c177a770408d4a7649 (patch) | |
tree | 26883979ecfe7f394d5821662e84767466896612 /gcc/fortran/openmp.c | |
parent | fa4d0418e4926467ac7c8e3c81c246ecf284da5d (diff) | |
download | gcc-394a5b34b1c35ef8aae0b6c177a770408d4a7649.zip gcc-394a5b34b1c35ef8aae0b6c177a770408d4a7649.tar.gz gcc-394a5b34b1c35ef8aae0b6c177a770408d4a7649.tar.bz2 |
re PR fortran/40878 (!$omp collapse(m) with non-constant m should give error)
PR fortran/40878
* openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of
gfc_error to diagnose invalid COLLAPSE arguments.
* gfortran.dg/gomp/pr40878-1.f90: New test.
* gfortran.dg/gomp/pr40878-2.f90: New test.
From-SVN: r150165
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r-- | gcc/fortran/openmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 608d605..320fb65 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -396,12 +396,13 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, int mask) const char *p = gfc_extract_int (cexpr, &collapse); if (p) { - gfc_error (p); + gfc_error_now (p); collapse = 1; } else if (collapse <= 0) { - gfc_error ("COLLAPSE clause argument not constant positive integer at %C"); + gfc_error_now ("COLLAPSE clause argument not" + " constant positive integer at %C"); collapse = 1; } c->collapse = collapse; |