https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-valid-code |diagnostic, | |ice-on-invalid-code CC| |anlauf at gcc dot gnu.org --- Comment #4 from anlauf at gcc dot gnu.org --- This is indeed invalid code that is poorly diagnosed. F2018: 15.6.2.6 ENTRY statement (3) ... If the characteristics of the result of the function named in the ENTRY statement are the same as the characteristics of the result of the function named in the FUNCTION statement, their result names identify the same entity, although their names need not be the same. Otherwise, they are storage associated and shall all be nonpointer, nonallocatable scalar variables that are default integer, default real, double precision real, default complex, or default logical. Note that character variables are not listed explicitly in the last sentence, thus the different characteristics of f and g are not allowed. Intel also rejects the code: pr87737.f90(17): error #6625: The character lengths of the functions must not be different. [G] entry g() ------^ NAG: Error: pr87737.f90, line 19: Function F is allocatable but ENTRY point G is not Unless we have a GNU extension here, we should reject the code in a similar way. Keywords adjusted.