Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28457 Discussions

Unexpected error #7846: .. not permissible to reference the value of an ac-implied-do variable in one of its limit expressions

FortranFan
Honored Contributor II
379 Views

The compiler response of "error #7846: It is not permissible to reference the value of an ac-implied-do variable in one of its limit expressions." for the following code appears incorrect:

   subroutine foo()

      integer, parameter :: m = 0
      integer, parameter :: n = 1
      integer :: i
      integer :: j(m:n)

      j = [( i, i = int(m, kind=kind(i)), int(n, kind=kind(i)) )]

   end subroutine foo
Compiling with Intel(R) Visual Fortran Compiler 16.0 [Intel(R) 64]...
foo.f90
foo.f90(8): error #7846: It is not permissible to reference the value of an ac-implied-do variable in one of its limit expressions.
compilation aborted for foo.f90 (code 1)

 

0 Kudos
1 Reply
Kevin_D_Intel
Employee
379 Views

Thank you for reporting this. I reported it to our Developers.

(Internal tracking id: DPD200378387)

0 Kudos
Reply