Hi Thomas,

I haven't tested your patch very thorougly, but when manually
compiling

% gfc-16 gcc/testsuite/gfortran.dg/proc_ptr_52.f90 -Wexternal-argument-mismatch && ./a.out
STOP 1

It appears that something is not right and generates wrong code with
the check enabled.  Can you have another look?

Cheers,
Harald

Am 03.05.25 um 11:11 schrieb Thomas Koenig:
Hello world,

This patch fixes a case where too much was being checked with
-Wexternal-arguments-mismatch with a procedure pointer with an
unlimited polymorphic and an INTEGER argument which was inferred from
an actual argument.I also found some checks which can trigger false
positives, which this patch also excludes from testing.

Regression-tested.

OK for trunk and backport to gcc-15?

Best regards

     Thomas

gcc/fortran/ChangeLog:

     PR fortran/119928
     * interface.cc (gfc_check_dummy_characteristics): Do not issue
     error for type if one argument is an unlimited polymorphic entity
     and the other one has been generated from an actual argument.
     Do not check OPTIONAL, INTENT, ALLOCATABLE, POINTER, TARGET, VALUE,
     ASYNCHRONOUS or CONTIGUOUS if one of the arguments has been
     generated from an actual argument.

gcc/testsuite/ChangeLog:

     PR fortran/119928
     * gfortran.dg/interface_60.f90: New test.

Reply via email to