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

compiler rejects Fortran source containing variable with name "SELECT"

mecej4
Honored Contributor III
432 Views

Here is a stripped down version of an example code from the MKL forum, see https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/606702#comment-1856431 .

The 16.0.1 and 16.0.2 compilers give a syntax error on line 14. If the variable select is renamed to slct, the syntax error goes away. If the subscript expression (/1,2,4/) is replaced by the equivalent [1,2,4], the syntax error goes away.

program xhess
implicit none
integer, parameter :: dp=kind(0d0)
integer i,j,n
real(dp), allocatable :: h(:,:),hsav(:,:),wr(:),wi(:),vr(:,:)
logical, allocatable :: select(:)
!
read(*,*)          ! title line
read(*,*) n
allocate (h(n,n),hsav(n,n),wr(n),wi(n),select(n),vr(n,2))
read(*,*)((h(i,j),j=1,n),i=1,n)
hsav=h                                  ! save for use with hsein

select((/1,2,4/)) = .false.
select(3) = .true.
end program

 

0 Kudos
3 Replies
Steven_L_Intel1
Employee
432 Views

Thanks - we'll check it out.

0 Kudos
Steven_L_Intel1
Employee
433 Views

Issue ID is DPD200407999.

0 Kudos
Steven_L_Intel1
Employee
433 Views

Fixed for the 17.0 release later this year. The fix is not in the current beta.

0 Kudos
Reply