Message ID | a286b83e-a3a2-1c87-92f6-45e799b47549@tkoenig.net |
---|---|
State | New |
Headers | show |
Series | [fortran,committed] Error on Associate with a program | expand |
Index: resolve.c =================================================================== --- resolve.c (Revision 279064) +++ resolve.c (Arbeitskopie) @@ -8842,6 +8842,12 @@ resolve_assoc_var (gfc_symbol* sym, bool resolve_t gcc_assert (target->symtree); tsym = target->symtree->n.sym; + if (tsym->attr.flavor == FL_PROGRAM) + { + gfc_error ("Associating entity %qs at %L is a PROGRAM", + tsym->name, &target->where); + return; + } sym->attr.asynchronous = tsym->attr.asynchronous; sym->attr.volatile_ = tsym->attr.volatile_;