https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- GCC 10+ rejects this code with: /app/example.f90:2:9: 2 | program p | 1 Error: Entity 'master.0.f' at (1) has a deferred type parameter and requires either the POINTER or ALLOCATABLE attribute IFC also rejects it: /app/example.f90(18): error #6625: The character lengths of the functions must not be different. [G] entry g() ------^ compilation aborted for /app/example.f90 (code 1) flang also rejects it: /app/example.f90:18:7: error: Result of ENTRY is not compatible with result of containing function entry g() ^ /app/example.f90:13:10: Containing subprogram function f() ^ so maybe this is fixed.