https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62176
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |janus at gcc dot gnu.org Resolution|--- |INVALID --- Comment #3 from janus at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #1) > Reduced test > [...] > > The code compiles if the lines > > generic :: lle => string_less_equal_char, & > char_less_equal_string > > are commented. I cannot see how 'string_less_equal_char' and > 'char_less_equal_string' are ambiguous for 'lle', but not for operator '<='. Well, that's simply due to the different invocation syntax for both cases. 1) For the type-bound generic 'lle', the call looks like this: str%lle(ch) This matches both specific TBPs (which only differ in the position of the PASS argument), therefore they are ambiguous in this context. 2) The operator '<=' is invoked by one of the two forms: str <= ch ch <= str Here both specifics can be distinguished, so they are not ambiguous. In summary, gfortran's behavior is perfectly fine. This is a non-bug.