Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Rainer Keller (Keller_at_[hidden])
Date: 2005-11-28 06:59:31


Hello George,
you're right, while g77 accepts the I-format, gfortran coming with gcc-4.0.2
does not anymore....

Thinking about it, it really seems to be the only viable solution (though I
don't know Fortran that much), to have a separate print-function in C....
Setting a tmp-integer-variable to the logical would fail e.g. on pgi-compiler
(although he swollowed the I5-formatting)...

Thanks,
Rainer

On Monday 28 November 2005 07:26, George Bosilca wrote:
> 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

-- 
---------------------------------------------------------------------
Dipl.-Inf. Rainer Keller       email: keller_at_[hidden]
  High Performance Computing     Tel: ++49 (0)711-685 5858
    Center Stuttgart (HLRS)        Fax: ++49 (0)711-678 7626
  POSTAL:Nobelstrasse 19             http://www.hlrs.de/people/keller
  ACTUAL:Allmandring 30, R. O.030
  70550 Stuttgart