Hello,

the principle looks good, but...

Le 18/07/2022 à 22:43, Harald Anlauf via Fortran a écrit :

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 2ebf076f730..dacd33561d0 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -5004,7 +5004,11 @@ find_array_spec (gfc_expr *e)
       {
       case REF_ARRAY:
        if (as == NULL)
-         gfc_internal_error ("find_array_spec(): Missing spec");
+         {
+           gfc_error ("Symbol %qs at %L has not been declared as an array",
+                      e->symtree->n.sym->name, &e->where);

... the error here only makes sense if the array reference follows a variable reference. If it follows a derived type component reference, a slightly different error message would be more appropriate.

Reply via email to