https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25095

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #8 from anlauf at gcc dot gnu.org ---
(In reply to Jürgen Reuter from comment #7)
> Indeed, ifort and PGI fortran flag this as an error in the implied DO
> expression. Nagfor flags it just as an extension.

Actually, current nagfor flags it as:

% nagfor pr25095.f90 -f2003
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7101
Extension(F2008): pr25095.f90, line 2: Function reference in DATA-implied-DO
[NAG Fortran Compiler normal termination, 1 warning]

and is silent for -f2008 or -f2018 .

The F2018 (and similarly F2008) text is slightly clearer here:

! C881 (R841) In an array-element or scalar-structure-component that is a
! data-i-do-object, any subscript shall be a constant expression, and any
! primary within that subscript that is a data-i-do-variable shall be a
! DO variable of this data-implied-do or of a containing data-implied-do.

and then

! 10.1.12 Constant expression
!
! (5) a reference to an elemental standard intrinsic function, where each
! argument is a constant expression,
!
! (11) a data-i-do-variable within a data-implied-do,
!
! and Note 1

and among the standard intrinsic procedures:

! 16.9.136 MODULO (A, P)

So this is more likely an ifort and PGI/Nvidia bug on the one hand, and
on the other the question whether we care for a diagnostic for -std=f95 .

Reply via email to