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

List-directed read for Logical variables in IVF-11

longden_loo
Beginner
637 Views
I have code that compiled and executed in CVF-6.6 up thru IVF-10 which used a List-directed read to set a Logical variable.

The input data had always been a "0" or "1", rather than F or T, and this worked on compilers prior to IVF-11 (11.1.038) which now exceptions on that input unless I change it to F/T (or FALSE/TRUE).

Is this a bug in the IVF-11 compiler, or are they changing the rules?
0 Kudos
1 Solution
Steven_L_Intel1
Employee
637 Views
The rules have changed. Your input data is incorrect, but we allowed that in the past as a misguided extension. After many years of customer complaints, we disabled, by default, reading non-LOGICAL data items for LOGICAL variables and LOGICAL data items (T, F, etc.) for non-logical variables. You can restore the old behavior by specifying /assume:old_logical_ldio.

I recommend that you do not depend on this non-standard behavior.

View solution in original post

0 Kudos
3 Replies
Steven_L_Intel1
Employee
638 Views
The rules have changed. Your input data is incorrect, but we allowed that in the past as a misguided extension. After many years of customer complaints, we disabled, by default, reading non-LOGICAL data items for LOGICAL variables and LOGICAL data items (T, F, etc.) for non-logical variables. You can restore the old behavior by specifying /assume:old_logical_ldio.

I recommend that you do not depend on this non-standard behavior.
0 Kudos
longden_loo
Beginner
637 Views
Thanks, we'll go with the correct input format on all non-legacy code, and just use the back door on the old stuff where the change risk is more substantial.

BTW, I should probably ask this on another thread, but I've noticed we're also getting runtime exceptions now on character length mismatches...

forrtl: severe (408): fort: (18): Dummy character variable 'LIST_OF_TYPES' has length 128 which is greater then actual variable length 40.

... many of these are small strings with trailing blanks, and previously there was never any problems in the mismatch. Is this another rule change, and if so is there a similar circumvention?
0 Kudos
Steven_L_Intel1
Employee
637 Views
This and the other change are both noted in the release notes. In this latter case, your code is not valid and the error can lead to data corruption. If you want to suppress the error, turn off string and array bounds checking, but I do not recommend this.
0 Kudos
Reply