The latest set of changes for the detection of the compiler TRUE value seems to work fine for g77 but not for the newest GNU fortran compiler gfortran. Digging a little bit into the gfortran mailing list, I found a thread about this issue (quite recent only few months old). After debating over the Fortran language and GNU point of view, they decided that the default conversion between INTEGER and LOGICAL is a bad idea (even if it's supported by other compilers). Here is the link to the full discussion on the gfortran ML (http://gcc.gnu.org/ml/fortran/2005-05/msg00325.html).

This implicit conversion (LOGICAL to INTEGER) is used on the patch when write use the 'I5' to print out the value of the LOGICAL as an int.

Now, as far as I remember about my classes of F77 there is no casting operators and no implicit casting is allowed. So the way we detect the value of .TRUE. is not correct even if it's accepted by some compilers. I modify the config/f77_get_value_true.m4 file to (*I hope*) a slightly more F77 friendly version. The patch is attached to the email.

I'm waiting for comments before committing.

  Thanks,
    george.

"We must accept finite disappointment, but we must never lose infinite
hope."
                                  Martin Luther King

Attachment: true_detection.patch
Description: Binary data

Reply via email to