https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117765
Bug ID: 117765 Summary: Impure function within a BLOCK construct within a DO CONCURRENT Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kargls at comcast dot net Target Milestone: --- Created attachment 59689 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59689&action=edit patch The Fortran 2023 standard contains C1143 A reference to an impure procedure shall not appear within a DO CONCURRENT construct. gfortran fails to enforce this constraint if the impure function is wrapped within a BLOCK construct. That is, do concurrent (i=1:4) block y(i) = impure_foo(i) ! <-- not reported! end bloc end do The attached patch will have gfortran catch this.