[Bug fortran/82065] gfortran rejects redundant use of intrinsic module constant

"jvdelisle at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82065

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Still testing. Something like this:

diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
index 641b43dc771..162bffb5dba 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -2103,7 +2103,8 @@ gfc_get_symbol_decl (gfc_symbol * sym)
       && !(sym->attr.use_assoc && !intrinsic_array_parameter)
       && (sym->attr.save || sym->ns->proc_name->attr.is_main_program
          || !gfc_can_put_var_on_stack (DECL_SIZE_UNIT (decl))
-         || sym->attr.data || sym->ns->proc_name->attr.flavor == FL_MODULE)
+         || sym->attr.data || sym->ns->proc_name->attr.flavor == FL_MODULE
+         || intrinsic_array_parameter)
       && (flag_coarray != GFC_FCOARRAY_LIB
          || !sym->attr.codimension || sym->attr.allocatable)
       && !(IS_PDT (sym) || IS_CLASS_PDT (sym)))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.