[Bug fortran/71861] [7/8/9 Regression] [F03] ICE in write_symbol(): bad module symbol

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 19 17:05:00 GMT 2019


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

janus at gcc dot gnu.org changed:

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

--- Comment #8 from janus at gcc dot gnu.org ---
(In reply to kargl from comment #7)
> Does Note 15.2 in F2018 apply?
> 
>    An interface body cannot be used to describe the interface of an
>    internal procedure, a module procedure that is not a separate module
>    procedure, or an intrinsic procedure because the interfaces of such
>    procedures are already explicit. However, the name of a procedure
>    can appear in a PROCEDURE statement in an interface block (15.4.3.2).

Probably yes. In any case, the test cases are rejected with an INTERFACE that
is not ABSTRACT:

Error: EXTERNAL attribute conflicts with INTRINSIC attribute at (1)


With an ABSTRACT INTERFACE, they can be rejected via:

diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index c342d62ead1..ec753229a98 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -557,6 +557,7 @@ check_conflict (symbol_attribute *attr, const char *name,
locus *where)

   conf (external, intrinsic);
   conf (entry, intrinsic);
+  conf (abstract, intrinsic);

   if ((attr->if_source == IFSRC_DECL && !attr->procedure) || attr->contained)
     conf (external, subroutine);



I'm about to regtest this ...


More information about the Gcc-bugs mailing list