gfortran requires format widths while ifort doesn't?

前端 未结 1 1062
抹茶落季
抹茶落季 2021-01-14 19:51

I am trying to migrate a .FOR file (for practice purposes) from ifort to gfortran. This file compiles in my Intel Visual Fortran solution with no issues. However when I comp

1条回答
  •  一整个雨季
    2021-01-14 20:20

    Your observation is correct, I have encountered this myself before. Intel Fortran does not enforce this requirement while gfortran does. The field width is actually required by the Fortran standard. I am not aware of any compiler option that could change this behaviour. The only option I am aware of is to fix the code to make it standard compliant.

    How to do it can be found in Error: Nonnegative width required in format string at (1) . Note that the g0 that you asked about is not a compiler option to accept I. It is a different format descriptor to put into the code instead of I.

    0 讨论(0)
提交回复
热议问题