This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/77296] Compiler Error with allocatable string and associate


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code,
                   |                            |wrong-code

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This patch

Index: resolve.c
===================================================================
--- resolve.c   (Revision 239218)
+++ resolve.c   (Arbeitskopie)
@@ -11551,7 +11551,8 @@ resolve_fl_variable (gfc_symbol *sym, int mp_flag)
   if (sym->ts.deferred
       && !(sym->attr.pointer
           || sym->attr.allocatable
-          || sym->attr.omp_udr_artificial_var))
+          || sym->attr.omp_udr_artificial_var
+          || sym->assoc))
     {
       gfc_error ("Entity %qs at %L has a deferred type parameter and "
                 "requires either the pointer or allocatable attribute",

makes the ICE go away, but does not lead to correct code.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]