-fugly-logint ?
Tom Roche
Tom_Roche@pobox.com
Sun Nov 27 20:31:00 GMT 2011
summary: Code I'm compiling with 4.6.1 gives the error
> foo.f -o foo.o
> foo.f:780.10:
> IF (LIMIT_Sg == .TRUE.) THEN
> 1
> Error: Logicals at (1) must be compared with .eqv. instead of ==
Can I fix this error without fixing the code? E.g., can one compile
with something like -fugly-logint (which I see while googling, but not
in current docs)?
details:
I'm building, with gcc/gfortran,
$ gcc --version
gcc (Debian 4.6.1-4) 4.6.1
...
$ gfortran --version
GNU Fortran (Debian 4.6.1-4) 4.6.1
...
legacy atmospheric-modeling code that has previously been {built with,
documented for} icc/ifc (except for the most-out-of-date docs, which use
PGI). Since I'm just building, I'm striving not to edit any sources
(just build scripts and Makefile's). However, in one module (of course,
the last :-) I'm getting errors like
$ .../scripts/buildThat.sh
... reformatted for clarity
> /usr/bin/gfortran -c -ffixed-line-length-132 -fd-lines-as-comments -w -m64 -march=native -funroll-loops --param max-unroll-times=4 -ftree-vectorize -ftree-vectorizer-verbose=0 -O2 -J/path/to/that/MOD_DIR -I.
> -DLOTS_O_VARS=\"lots o' values\" \
...
> foo.f -o foo.o
> foo.f:780.10:
> IF (LIMIT_Sg == .TRUE.) THEN
> 1
> Error: Logicals at (1) must be compared with .eqv. instead of ==
In googling, I see several references to a flag -fugly-logint that was
apparently once available for handling (or avoiding handling :-) old/
defective code like this, but the references are all pre-2008, and I'm
not seeing -fugly-logint listed @
http://gcc.gnu.org/onlinedocs/gfortran/Option-Summary.html#Option-Summary
Must I fix the code, or is there a way to tell gfortran to not be so
scrupulous?
TIA, Tom Roche <Tom_Roche@pobox.com>
More information about the Fortran
mailing list