public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923
       [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-27  2:10 ` pinskia at gcc dot gnu.org
  2021-08-27 14:57 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27  2:10 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923
       [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
  2021-08-27  2:10 ` [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923 pinskia at gcc dot gnu.org
@ 2021-08-27 14:57 ` anlauf at gcc dot gnu.org
  2021-08-27 20:17 ` anlauf at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-08-27 14:57 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923
       [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
  2021-08-27  2:10 ` [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923 pinskia at gcc dot gnu.org
  2021-08-27 14:57 ` anlauf at gcc dot gnu.org
@ 2021-08-27 20:17 ` anlauf at gcc dot gnu.org
  2021-08-28 18:10 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-08-27 20:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org

--- Comment #5 from anlauf at gcc dot gnu.org ---
Patch: https://gcc.gnu.org/pipermail/fortran/2021-August/056446.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923
       [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-08-27 20:17 ` anlauf at gcc dot gnu.org
@ 2021-08-28 18:10 ` cvs-commit at gcc dot gnu.org
  2021-08-30 20:18 ` cvs-commit at gcc dot gnu.org
  2021-08-30 20:21 ` anlauf at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-28 18:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:f9809ef57005409ee658294d6e8dad9ee8897e88

commit r12-3201-gf9809ef57005409ee658294d6e8dad9ee8897e88
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Aug 28 20:09:44 2021 +0200

    Fortran - reject function entries with mismatched characteristics

    gcc/fortran/ChangeLog:

            PR fortran/87737
            * resolve.c (resolve_entries): For functions of type CHARACTER
            tighten the checks for matching characteristics.

    gcc/testsuite/ChangeLog:

            PR fortran/87737
            * gfortran.dg/entry_24.f90: New test.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923
       [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-08-28 18:10 ` cvs-commit at gcc dot gnu.org
@ 2021-08-30 20:18 ` cvs-commit at gcc dot gnu.org
  2021-08-30 20:21 ` anlauf at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-30 20:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:7b1c1fc0e6bc2970c96ae12e9cb23df0b3eadf4a

commit r11-8943-g7b1c1fc0e6bc2970c96ae12e9cb23df0b3eadf4a
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Aug 28 20:09:44 2021 +0200

    Fortran - reject function entries with mismatched characteristics

    gcc/fortran/ChangeLog:

            PR fortran/87737
            * resolve.c (resolve_entries): For functions of type CHARACTER
            tighten the checks for matching characteristics.

    gcc/testsuite/ChangeLog:

            PR fortran/87737
            * gfortran.dg/entry_24.f90: New test.

    (cherry picked from commit f9809ef57005409ee658294d6e8dad9ee8897e88)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923
       [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-08-30 20:18 ` cvs-commit at gcc dot gnu.org
@ 2021-08-30 20:21 ` anlauf at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-08-30 20:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and backported to 11-branch.  Closing.

Thanks for the report!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-30 20:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-87737-4@http.gcc.gnu.org/bugzilla/>
2021-08-27  2:10 ` [Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923 pinskia at gcc dot gnu.org
2021-08-27 14:57 ` anlauf at gcc dot gnu.org
2021-08-27 20:17 ` anlauf at gcc dot gnu.org
2021-08-28 18:10 ` cvs-commit at gcc dot gnu.org
2021-08-30 20:18 ` cvs-commit at gcc dot gnu.org
2021-08-30 20:21 ` anlauf at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).