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

Array Index Range Checking

gryvon
Beginner
427 Views
I can compile successfully the program below! Please explain, why putting two directives concerning default "kind" makes it compile with no error?
Thank you.
program test
cDEC$ integer:8
cDEC$ real:8
implicit none
real*8, dimension(1:10) :: myArray
myArray(11) = dble(0.0d0)
stop
end program test
0 Kudos
1 Reply
Steven_L_Intel1
Employee
427 Views
Now, that is an interesting question. I can see that if I compile this source with /check:bounds that I get a compile-time warning about the bounds reference only if the directives are absent. I can't think of why this is and will ask the developers.
0 Kudos
Reply