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

Files which compile when Digital thinks they should not

ferrad01
Beginner
394 Views
Both these files compile OK in Intel but fail in Digital:

test5.for:


SUBROUTINE ORNL_CU(ALLOY,ACTIVITY,GMPURE,GMOFALLOY,
$ TEMPERATURE,PRESSURE,NUM,NPHASE)
IMPLICIT NONE

DOUBLE PRECISION ALLOY(NUM)
DOUBLE PRECISION ACTIVITY(NPHASE,NUM),GMPURE(NPHASE,NUM)
DOUBLE PRECISION GMOFALLOY(NPHASE), TEMPERATURE,PRESSURE

INTEGER NUM, NPHASE

CONTINUE
RETURN
END

should this not fail as NUM and NPHASE have not been declared before being used?


test6.f90:


program test
implicit none
integer :: i

do i = 1, 10

IF(i .eq. 5)GOTO&
90

cycle
90 continue
write(6,*) 'got here'

enddo
end

Should this not fail as the split line is missing a space between GOTO and 90 (free format source)
0 Kudos
3 Replies
Steven_L_Intel1
Employee
394 Views
The Intel compiler does uninitialized variable checking at run-time when the option is enabled.

There's nothing wrong with the second case. There is indeed a space after the word GOTO - several of them in fact.
0 Kudos
ferrad01
Beginner
394 Views
In the first case, it's not the runtime I'm worried about, I thought it shouldn't compile as I have IMPLICIT NONE and NUM and NPHASE have been used before being declared. Maybe it's just an old bugbear with Digital / CVF that Intel now doesn't worry about.
0 Kudos
Steven_L_Intel1
Employee
394 Views
Ah, I see. I know a lot of compilers would let this go because the variables are declared later, but the standard requires that they be declared "previously". I'll ask the developers to look at this.
0 Kudos
Reply