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

Code compiling in Release but not Debug

Kevin_Brandon
Beginner
816 Views
Hello,

I've recently upgraded from CVF to to Intel's Fortran 11.1, and I am trying to compile some "legacy" fortran code from the late 70's and early 80's. It compiles while in release mode, but when I switch to debug I get several errors.

These are the 3 main errors I get:

"error #6552: The CALL statement is invoking a function subprogram as a subroutine."
"error #8299: A scalar actual argument must be passed to a scalar dummy argument unless the actual argument is of type character or is an element of an array that is neither assumed shape or pointer."
"error #6633: The type of the actual argument differs from the type of the dummy argument.

Is there a switch in the compiler to disable these error checks? And any idea why it compiles in release, but not debug?

Thanks,
Kevin
0 Kudos
3 Replies
Steven_L_Intel1
Employee
816 Views
The debug configuration enables "generated interface checking", where it looks for errors in calls to routines even if you use Fortran 77 style coding without explicit interfaces. In most cases, this finds real errors in your programs.

The three errors you show here all appear legitimate and should be corrected in your program. The one about calling a function as a subroutine, in particular, can lead to wrong results and data corruption. The other errors may also lead to wrong answers.

If you want to disable the checks, go to the Fortran > Diagnostics property page and change "Check routine interfaces" to "No". My advice, though, would be to correct the errors in your code, which older compilers often would not catch.
0 Kudos
Matthijs_Boerlage
816 Views

folks,

Same issue here: 6552 error while code compiles & runs fine with other compilers. When I try to disable this interface checking (in MS Vis. Studio: Project -> Properties -> Fortran -> Diagnostics -> check routine interfaces "set to No"); nothing changes.

any ideas?

Matt

0 Kudos
Les_Neilson
Valued Contributor II
816 Views
Error 6552 means you have something like

function X(...)
....
end function x


call X(...)

which is illegal !
it should be

Y = X(...)

Interface checking refers to the actual and dummy arguments being of the correct type etc.

Les
0 Kudos
Reply