]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix checking for IMPURE in DO CONCURRENT.
authorSteven G. Kargl <kargl@gcc.gnu.org>
Sat, 19 Apr 2025 01:05:10 +0000 (18:05 -0700)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 23 Apr 2025 15:25:22 +0000 (08:25 -0700)
commit3483a2b39591db06e3cbcdb4bdfa0db468ebc8ee
treef1b027866b3d049cdc9e1b35086cfda6b903d686
parent51ed76fe86fc4a2421ef843eb3fc06d633d50ebb
Fortran: Fix checking for IMPURE in DO CONCURRENT.

PR fortran/119836

gcc/fortran/ChangeLog:

* resolve.cc (check_pure_function): Fix checking for
an impure subprogram within a DO CONCURRENT construct.
(pure_subroutine): Ditto.

gcc/testsuite/ChangeLog:

* gfortran.dg/do_concurrent_all_clauses.f90: Remove invalid
dg-error test.
* gfortran.dg/pr119836_1.f90: New test.
* gfortran.dg/pr119836_2.f90: New test.
* gfortran.dg/pr119836_3.f90: New test.
* gfortran.dg/pr119836_4.f90: New test.

(cherry picked from commit f9ea46d946887a05d7ecbca5aeeb99fd868f6e70)
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/do_concurrent_all_clauses.f90
gcc/testsuite/gfortran.dg/pr119836_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr119836_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr119836_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr119836_4.f90 [new file with mode: 0644]