[PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr)

Paul-Antoine Arras pa@codesourcery.com
Fri Oct 20 14:02:39 GMT 2023


Hi all,

The attached patch fixes a bug that causes valid OpenMP declare variant 
directive and functions to be rejected with the following error (see 
testcase):

c_ptr.f90:41:37:

    41 |     !$omp declare variant(foo_variant)          &
       |                                     1
Error: variant ‘foo_variant’ and base ‘foo’ at (1) have incompatible 
types: Type mismatch in argument 'c_bv' (INTEGER(8)/TYPE(c_ptr))

The fix consists in special-casing this situation in gfc_compare_types().

OK for mainline?

Thanks,
-- 
PA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fortran-Fix-incompatible-types-between-INTEGER-8-and.patch
Type: text/x-patch
Size: 5060 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20231020/c681a31e/attachment.bin>


More information about the Fortran mailing list