[Bug fortran/102727] Warning for guaranteed interoperable type kind

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 6 20:49:38 GMT 2021


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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org
   Last reconfirmed|                            |2021-11-06
     Ever confirmed|0                           |1
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.

F2018, section 18 has the interesting

NOTE 1
A Fortran entity can be interoperable with more than one C entity.

but also in 18.3.1

A Fortran intrinsic type with particular type parameter values is interoperable
with a C type if the type and kind type parameter value are listed in the
table (18.2) on the same row as that C type. ...

Assuming the standard as normative, we're potentially trying to see a conflict
where there is possibly none.

And if kind(1), c_int, c_int32_t, and the kind of an enum are the same on
x86_64,
one could argue that these can be interoperable.


More information about the Gcc-bugs mailing list