------- Comment #3 from dfranke at gcc dot gnu dot org 2010-05-13 13:26 ------- That's easily doable. Alternative patch for data.c below gives:
$ gfortran-svn pr38404.f pr38404.f:5.7: X'"R" IN CALL RANDOM MAY NOT BE USED OUTSIDE THE BLOCK CONTAINING T 1 Warning: Initialization string starting at (1) was truncated to fit the variable (73/72) (Modified the message to be similar to many other actual-size/expected-size outputs) Index: data.c =================================================================== --- data.c (revision 159348) +++ data.c (working copy) @@ -154,9 +154,10 @@ create_character_intializer (gfc_expr *i if (len > end - start) { + gfc_warning_now ("Initialization string starting at %L was " + "truncated to fit the variable (%d/%d)", + &rvalue->where, len, end - start); len = end - start; - gfc_warning_now ("initialization string truncated to match variable " - "at %L", &rvalue->where); } if (rvalue->ts.type == BT_HOLLERITH) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38404