http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52101
--- Comment #6 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2012-02-04 00:01:08 UTC --- On Fri, Feb 03, 2012 at 10:46:53PM +0000, sgk at troutmask dot apl.washington.edu wrote: > > Index: decl.c > =================================================================== > --- decl.c (revision 183872) > +++ decl.c (working copy) > @@ -722,7 +722,7 @@ syntax: > char_len_param_value in parenthesis. */ > > static match > -match_char_length (gfc_expr **expr, bool *deferred) > +match_char_length (gfc_expr **expr, bool *deferred, bool entity_decl) > { > int length; > match m; > @@ -738,7 +738,8 @@ match_char_length (gfc_expr **expr, bool > > if (m == MATCH_YES) > { > - if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: " > + if (entity_decl > + && gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: " > "Old-style character length at %C") == FAILURE) > return MATCH_ERROR; > *expr = gfc_get_int_expr (gfc_default_integer_kind, NULL, length); > @@ -1845,7 +1846,7 @@ variable_decl (int elem) > > if (current_ts.type == BT_CHARACTER) > { > - switch (match_char_length (&char_len, &cl_deferred)) > + switch (match_char_length (&char_len, &cl_deferred, false)) > { > case MATCH_YES: > cl = gfc_new_charlen (gfc_current_ns, NULL); > @@ -2407,7 +2408,7 @@ gfc_match_char_spec (gfc_typespec *ts) > /* Try the old-style specification first. */ > old_char_selector = 0; > > - m = match_char_length (&len, &deferred); > + m = match_char_length (&len, &deferred, true); > if (m != MATCH_NO) > { > if (m == MATCH_YES) > Regression tested fine.