This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77296] Compiler Error with allocatable string and associate
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Aug 2016 16:12:25 +0000
- Subject: [Bug fortran/77296] Compiler Error with allocatable string and associate
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77296-4@http.gcc.gnu.org/bugzilla/>
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.