Fortran/OpenMP: Fix detecting not perfectly nested loops
authorTobias Burnus <tobias@codesourcery.com>
Tue, 4 Aug 2020 16:17:04 +0000 (18:17 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 4 Aug 2020 16:17:53 +0000 (18:17 +0200)
commit57dd9f3bfca8bb752c630431dc033c761e2ad382
tree804b391fc51456adb28b827fd4c0a07c371c2ee0
parent73b7cb6dfcad1b3e7538ddc2b40cc327d2fe501a
Fortran/OpenMP: Fix detecting not perfectly nested loops

gcc/fortran/ChangeLog:

* openmp.c (resolve_omp_do): Detect not perfectly
nested loop with innermost collapse.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/collapse1.f90: Add dg-error.
* gfortran.dg/gomp/collapse2.f90: New test.
gcc/fortran/openmp.c
gcc/testsuite/gfortran.dg/gomp/collapse1.f90
gcc/testsuite/gfortran.dg/gomp/collapse2.f90 [new file with mode: 0644]