[Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 27 14:57:22 GMT 2021


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.


More information about the Gcc-bugs mailing list