https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-04-14 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |accepts-invalid, diagnostic Priority|P3 |P5 Severity|normal |enhancement --- Comment #8 from anlauf at gcc dot gnu.org --- (In reply to Steve Kargl from comment #7) > I suspect it works by accident, but I don't have enough > time at the moment to go read the gfortran source. What > is likely happening is gfortran checks that the actual > and dummy argument both have the allocatable attribute. > For the actual argument, the symbol is probably marked > an allocatable attribute and an internal attribute > that designates this as a function-result, and gfortran > does not check for the latter. So marking as a missed diagnostic for invalid code.