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

Character argument: Different behavior when using 11.1

abhimodak
New Contributor I
338 Views
In a mixed language program, I am getting the following error:

fortl: severe (408): fort: (18): Dummy character variable 'C' has length 16 which is greater "then" actual variable length 8. (Note that there is a typo (then instead of than) in the reported error string.)

I started to get this error with the debug build of v11.1.035.

This error happens only when (a) I have debug build, AND (b) I use Debug --> Start without debugging (Ctrl+F5).

I do NOT get this if I use Start Debugging (F5).

I have done a cursory check. I think that the character variable array C is correctly declared. Since, we never got this error with earlier versions of the compiler, I suspect that the compiler is trapping somethign it wasn't earlier. However, the behavior that it traps it only with Start without debugging is odd.

Abhi
0 Kudos
4 Replies
jimdempseyatthecove
Honored Contributor III
338 Views

Can you identify the subroutine or function producing the report .AND. the caller? If so, make an INTERFACE declaration for the failing subroutine or functions .AND. use that interface in the caller.

This may be a case where a hidden argument (length) is passed and happens to work one way but not the other.

Jim Dempsey
0 Kudos
Steven_L_Intel1
Employee
338 Views
This diagnostic is part of string bounds checking and is new. I don't know why there would be a difference depending on how you ran the program, though. I get the error both ways when I try it.

Thanks for pointing out the spelling error in the message. I'll have it fixed.

Do you dispute the correctness of the error?
0 Kudos
abhimodak
New Contributor I
338 Views
Jim, thanks. I can see that the interfaces are defined. (However, I see comment block that says that these rely on "cppf77" package.)

Steve, I consistently get this only when I have debug build but I run without debugging....and as I mentioned earlier, this started to happen with 11.1.035.

I know I am creating an open-ended question.... I will try to create a stand alone case.

Abhi


0 Kudos
Steven_L_Intel1
Employee
338 Views
This particular diagnostic does not rely on interfaces, but if an explicit interface is visible (or you're using generated interfaces), then you'll get a different error at compile-time.
0 Kudos
Reply