This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52024] [OOP] GENERIC operator cannot be resolved
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 Jan 2012 09:38:52 +0000
- Subject: [Bug fortran/52024] [OOP] GENERIC operator cannot be resolved
- Auto-submitted: auto-generated
- References: <bug-52024-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52024
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-28
CC| |burnus at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-28 09:38:52 UTC ---
It works if one uses the very similar:
interface operator (==)
module procedure t_equal_i
module procedure i_equal_t
end interface
While for GENERIC, one calls in resolve.c's check_generic_tbp_ambiguity:
if (gfc_compare_interfaces (sym1, sym2, sym2->name, 1, 0, NULL, 0))
The INTERFACE is checked via interface.c's "gfc_check_interfaces (gfc_namespace
*ns)", which calls "check_interface1" for the actual check.
Note that the current ambiguity check fails to diagnose ambiguity between
GENERIC and INTERFACE, cf. PR 41951. Which might be fixed at the same time.