LI76785: INTERFACE INCORRECTLY MARKED AS AMBIGUOUS
Fixes are available
Closed as program error.
When compiling a generic binding similar to the example below, the compiler is incorrectly interpreting the binding as ambiguous. ===== EXAMPLE CODE ===== type my_type contains procedure, pass(val) :: my_sub_1 procedure, pass(val) :: my_sub_2 generic :: intr => my_sub_1, my_sub_2 end type ===== ERROR MESSAGE ===== 1514-714 (S) Procedures my_sub_2 and my_sub_1 must not appear in the same generic interface. The dummy argument that disambiguates the procedures by argument keyword appears earlier in the argument list than the dummy argument that disambiguates by position.
Removing the PASS object dummy arguments and converting into a generic interface block does not consider the interface ambiguous, and does not encounter the error message.
PROBLEM DESCRIPTION: When checking generic bindings for ambiguity, if the bindings contains a pair of PASS specific bindings where one specific binding: 1. Contains fewer non-optional dummy arguments than the other specific binding, and 2. The passed object dummy argument in this binding occurs earlier in the argument list than the PASS object dummy argument in the other specific binding. XL Fortran incorrectly interprets the generic binding as ambiguous. This problem does not affect generic bindings involving NOPASS specific bindings. It also does not affect generic interface blocks. USERS AFFECTED: User of XL Fortran using generic bindings involving passed object dummy arguments.
The problem has been fixed.
Reported component name
XL FORTRAN LINU
Reported component ID
NoSpecatt / Xsystem
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
XL FORTRAN LINU
Fixed component ID
Applicable component levels