https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89431

--- Comment #4 from MarkEggleston <mark.eggleston at codethink dot com> ---
(In reply to Dominique d'Humieres from comment #3)
> program test
>   use iso_fortran_env
>   implicit none
>   write(*,*) integer_kinds
> #ifdef __GFC_INT_1__
>   write(*,*) "__GFC_INT_1__ defined"
> #else
>   write(*,*) "__GFC_INT_1__ undefined"
> #endif
> #ifdef __GFC_INT_2__
>   write(*,*) "__GFC_INT_2__ defined"
> #else
>   write(*,*) "__GFC_INT_2__ undefined"
> #endif
> #ifdef __GFC_INT_8__
>   write(*,*) "__GFC_INT_8__ defined"
> #else
>   write(*,*) "__GFC_INT_8__ undefined"
> #endif
> #ifdef __GFC_INT_16__
>   write(*,*) "__GFC_INT_16__ defined"
> #else
>   write(*,*) "__GFC_INT_16__ undefined"
> #endif
>   write(*,*) real_kinds
> #ifdef __GFC_REAL_10__
>   write(*,*) "__GFC_REAL_10__ defined"
> #else
>   write(*,*) "__GFC_REAL_10__ undefined"
> #endif
> #ifdef __GFC_REAL_10__
>   write(*,*) "__GFC_REAL_16__ defined"
> #else
>   write(*,*) "__GFC_REAL_16__ undefined"
> #endif
> end program
> 
> gives
> 
>            1           2           4           8          16
>  __GFC_INT_1__ defined
>  __GFC_INT_2__ defined
>  __GFC_INT_8__ defined
>  __GFC_INT_16__ defined
>            4           8          10          16
>  __GFC_REAL_10__ defined
>  __GFC_REAL_16__ defined
> 
> So either the doc has to be adjusted to gcc/fortran/cpp.c or
> gcc/fortran/cpp.c has to be adjusted to the doc.

Since Fortran uses the name integer for its type rather than int I suggest that
the code should be changed.

Reply via email to