fortran-wringer-tests icon indicating copy to clipboard operation
fortran-wringer-tests copied to clipboard

Redundant operators

Open ivan-pi opened this issue 4 months ago • 1 comments

module a
    public :: operator(==), operator(.foo.)
    integer :: b = 33
end module
use a
print *,b
end

Flang and gfortran both ignore the operators. ifort and ifx produce an error:

/app/example.f90(2): error #6714: There is no visible interface-stmt that defines this generic-spec.
    public :: operator(==)
--------------^
/app/example.f90(2): error #6714: There is no visible interface-stmt that defines this generic-spec.   [FOO]
    public :: operator(==), operator(.foo.)
----------------------------^

ivan-pi avatar Sep 27 '24 17:09 ivan-pi