OSDN Git Service

2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / match.c
index 0fa1f63..941e625 100644 (file)
@@ -2591,7 +2591,7 @@ gfc_match_namelist (void)
              && gfc_add_in_namelist (&sym->attr, sym->name, NULL) == FAILURE)
            goto error;
 
-         /* Use gfc_error_check here, rather than goto error, so that this
+         /* Use gfc_error_check here, rather than goto error, so that
             these are the only errors for the next two lines.  */
          if (sym->as && sym->as->type == AS_ASSUMED_SIZE)
            {
@@ -2600,6 +2600,13 @@ gfc_match_namelist (void)
              gfc_error_check ();
            }
 
+         if (sym->ts.type == BT_CHARACTER && sym->ts.cl->length == NULL)
+           {
+             gfc_error ("Assumed character length '%s' in namelist '%s' at "
+                        "%C is not allowed", sym->name, group_name->name);
+             gfc_error_check ();
+           }
+
          if (sym->as && sym->as->type == AS_ASSUMED_SHAPE
              && gfc_notify_std (GFC_STD_GNU, "Assumed shape array '%s' in "
                                 "namelist '%s' at %C is an extension.",