]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/40881 ([F03] warn for obsolescent features)
authorJanus Weil <janus@gcc.gnu.org>
Sun, 2 Aug 2009 10:58:44 +0000 (12:58 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Sun, 2 Aug 2009 10:58:44 +0000 (12:58 +0200)
2009-08-02  Janus Weil  <janus@gcc.gnu.org>

PR fortran/40881
* decl.c (match_char_length): Warn about old-style character length
declarations.
* match.c (match_arithmetic_if,gfc_match_if): Modify warning message
for arithmetic if.
(gfc_match_goto): Warn about computed gotos.
(gfc_match_return): Warn about alternate return.
(gfc_match_st_function): Warn about statement functions.
* resolve.c (resolve_fl_procedure): Modify warning message for
assumed-length character functions.

2009-08-02  Janus Weil  <janus@gcc.gnu.org>

PR fortran/40881
* gfortran.dg/aliasing_dummy_1.f90: Add -std=legacy.
* gfortran.dg/altreturn_3.f90: Ditto.
* gfortran.dg/altreturn_5.f90: Ditto.
* gfortran.dg/altreturn_6.f90: Ditto.
* gfortran.dg/altreturn_7.f90: Ditto.
* gfortran.dg/array_constructor_13.f90: Ditto.
* gfortran.dg/arrayio_7.f90: Ditto.
* gfortran.dg/arrayio_8.f90: Ditto.
* gfortran.dg/assumed_charlen_function_3.f90: Modified warning message.
* gfortran.dg/assumed_charlen_function_4.f90: Add -std=legacy.
* gfortran.dg/assumed_charlen_function_5.f90: Modified warning message.
* gfortran.dg/backspace_8.f: Add -std=legacy.
* gfortran.dg/backspace_9.f: Ditto.
* gfortran.dg/char_comparison_1.f: Ditto.
* gfortran.dg/char_decl_1.f90: Ditto.
* gfortran.dg/char_initialiser_actual.f90: Ditto.
* gfortran.dg/char_pointer_assign.f90: Ditto.
* gfortran.dg/char_pointer_dependency.f90: Ditto.
* gfortran.dg/char_pointer_dummy.f90: Ditto.
* gfortran.dg/char_pointer_func.f90: Ditto.
* gfortran.dg/common_8.f90: Ditto.
* gfortran.dg/constant_substring.f: Ditto.
* gfortran.dg/data_char_2.f90: Ditto.
* gfortran.dg/der_array_io_1.f90: Ditto.
* gfortran.dg/der_array_io_2.f90: Ditto.
* gfortran.dg/der_array_io_3.f90: Ditto.
* gfortran.dg/der_io_3.f90: Ditto.
* gfortran.dg/dev_null.F90: Ditto.
* gfortran.dg/direct_io_2.f90: Ditto.
* gfortran.dg/do_iterator_2.f90: Ditto.
* gfortran.dg/e_d_fmt.f90: Ditto.
* gfortran.dg/empty_format_1.f90: Ditto.
* gfortran.dg/entry_17.f90: Modified warning message.
* gfortran.dg/entry_7.f90: Add -std=legacy.
* gfortran.dg/eor_1.f90: Ditto.
* gfortran.dg/equiv_2.f90: Ditto.
* gfortran.dg/equiv_constraint_2.f90: Use new-style character length.
* gfortran.dg/equiv_substr.f90: Add -std=legacy.
* gfortran.dg/extended_char_comparison_1.f: Ditto.
* gfortran.dg/fmt_bz_bn_err.f: Ditto.
* gfortran.dg/fmt_error_2.f90: Ditto.
* gfortran.dg/fmt_read_bz_bn.f90: Ditto.
* gfortran.dg/fmt_tl.f: Ditto.
* gfortran.dg/fmt_white.f: Ditto.
* gfortran.dg/func_derived_1.f90: Ditto.
* gfortran.dg/g77_intrinsics_funcs.f: Ditto.
* gfortran.dg/g77_intrinsics_sub.f: Ditto.
* gfortran.dg/global_references_2.f90: Ditto.
* gfortran.dg/hollerith_1.f90: Ditto.
* gfortran.dg/hollerith.f90: Use new-style character length.
* gfortran.dg/hollerith_f95.f90: Ditto.
* gfortran.dg/ichar_1.f90: Add -std=legacy.
* gfortran.dg/implicit_6.f90: Ditto.
* gfortran.dg/implicit_9.f90: Ditto.
* gfortran.dg/inquire_13.f90: Ditto.
* gfortran.dg/inquire_5.f90: Ditto.
* gfortran.dg/inquire_6.f90: Ditto.
* gfortran.dg/inquire.f90: Ditto.
* gfortran.dg/io_constraints_1.f90: Use new-style character length.
* gfortran.dg/io_constraints_2.f90: Ditto.
* gfortran.dg/list_read_2.f90: Add -std=legacy.
* gfortran.dg/loc_2.f90: Ditto.
* gfortran.dg/logical_1.f90: Ditto.
* gfortran.dg/longline.f: Ditto.
* gfortran.dg/merge_char_1.f90: Ditto.
* gfortran.dg/namelist_12.f: Ditto.
* gfortran.dg/namelist_14.f90: Ditto.
* gfortran.dg/namelist_18.f90: Ditto.
* gfortran.dg/namelist_19.f90: Ditto.
* gfortran.dg/namelist_21.f90: Ditto.
* gfortran.dg/namelist_22.f90: Ditto.
* gfortran.dg/namelist_37.f90: Ditto.
* gfortran.dg/namelist_54.f90: Ditto.
* gfortran.dg/namelist_55.f90: Ditto.
* gfortran.dg/namelist_empty.f90: Ditto.
* gfortran.dg/namelist_use.f90: Use new-style character length.
* gfortran.dg/namelist_use_only.f90: Add -std=legacy.
* gfortran.dg/nested_modules_4.f90: Ditto.
* gfortran.dg/nested_modules_5.f90: Ditto.
* gfortran.dg/open-options-blanks.f: Ditto.
* gfortran.dg/output_exponents_1.f90: Ditto.
* gfortran.dg/parens_5.f90: Ditto.
* gfortran.dg/parens_6.f90: Ditto.
* gfortran.dg/parent_result_ref_2.f90: Modified warning message.
* gfortran.dg/pointer_function_actual_1.f90: Add -std=legacy.
* gfortran.dg/pr15129.f90: Ditto.
* gfortran.dg/pr15332.f: Ditto.
* gfortran.dg/pr16597.f90: Ditto.
* gfortran.dg/pr17143.f90: Ditto.
* gfortran.dg/pr17164.f90: Ditto.
* gfortran.dg/pr17229.f: Modified warning message.
* gfortran.dg/pr18210.f90: Add -std=legacy.
* gfortran.dg/pr19155.f: Ditto.
* gfortran.dg/pr20086.f90: Ditto.
* gfortran.dg/pr20124.f90: Ditto.
* gfortran.dg/pr20755.f: Ditto.
* gfortran.dg/pr20865.f90: Ditto.
* gfortran.dg/pr20950.f: Ditto.
* gfortran.dg/pr21730.f: Ditto.
* gfortran.dg/pr22491.f: Ditto.
* gfortran.dg/pr29713.f90: Ditto.
* gfortran.dg/print_parentheses_1.f: Ditto.
* gfortran.dg/print_parentheses_2.f90: Ditto.
* gfortran.dg/proc_assign_1.f90: Ditto.
* gfortran.dg/proc_decl_1.f90: Ditto.
* gfortran.dg/proc_ptr_17.f90: Add dg-warning.
* gfortran.dg/read_eor.f90: : Add -std=legacy.
* gfortran.dg/read_float_1.f90: Ditto.
* gfortran.dg/read_logical.f90: Ditto.
* gfortran.dg/recursive_statement_functions.f90: Ditto.
* gfortran.dg/return_1.f90: Ditto.
* gfortran.dg/rewind_1.f90: Ditto.
* gfortran.dg/runtime_warning_1.f90: Use new-style character length.
* gfortran.dg/scalar_return_1.f90: Add -std=legacy.
* gfortran.dg/stfunc_1.f90: Ditto.
* gfortran.dg/stfunc_3.f90: Ditto.
* gfortran.dg/stfunc_4.f90: Ditto.
* gfortran.dg/stfunc_6.f90: Ditto.
* gfortran.dg/streamio_2.f90: Ditto.
* gfortran.dg/string_ctor_1.f90: Ditto.
* gfortran.dg/string_null_compare_1.f: Ditto.
* gfortran.dg/substr_6.f90: Ditto.
* gfortran.dg/tl_editing.f90: Ditto.
* gfortran.dg/unf_io_convert_1.f90: Use new-style character length.
* gfortran.dg/warnings_are_errors_1.f90: Modified warning message.
* gfortran.dg/x_slash_1.f: Add -std=legacy.
* gfortran.dg/g77/1832.f: Ditto.
* gfortran.dg/g77/19981216-0.f Ditto.
* gfortran.dg/g77/19990525-0.f: Ditto.
* gfortran.dg/g77/19990826-2.f: Ditto.
* gfortran.dg/g77/20000630-2.f: Ditto.
* gfortran.dg/g77/20010116.f: Ditto.
* gfortran.dg/g77/20010519-1.f: Use new-style character length.
* gfortran.dg/g77/980419-2.f: Add -std=legacy.
* gfortran.dg/g77/980520-1.f: Ditto.
* gfortran.dg/g77/check0.f: Ditto.
* gfortran.dg/g77/cpp3.F: Ditto.
* gfortran.dg/g77/cpp4.F: Use new-style character length.
* gfortran.dg/g77/f77-edit-i-in.f: Add -std=legacy.
* gfortran.dg/g77/f77-edit-t-in.f: Ditto.
* gfortran.dg/g77/short.f: Ditto.

From-SVN: r150349

146 files changed:
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/aliasing_dummy_1.f90
gcc/testsuite/gfortran.dg/altreturn_3.f90
gcc/testsuite/gfortran.dg/altreturn_5.f90
gcc/testsuite/gfortran.dg/altreturn_6.f90
gcc/testsuite/gfortran.dg/altreturn_7.f90
gcc/testsuite/gfortran.dg/array_constructor_13.f90
gcc/testsuite/gfortran.dg/arrayio_7.f90
gcc/testsuite/gfortran.dg/arrayio_8.f90
gcc/testsuite/gfortran.dg/assumed_charlen_function_3.f90
gcc/testsuite/gfortran.dg/assumed_charlen_function_4.f90
gcc/testsuite/gfortran.dg/assumed_charlen_function_5.f90
gcc/testsuite/gfortran.dg/backspace_8.f
gcc/testsuite/gfortran.dg/backspace_9.f
gcc/testsuite/gfortran.dg/char_comparison_1.f
gcc/testsuite/gfortran.dg/char_decl_1.f90
gcc/testsuite/gfortran.dg/char_initialiser_actual.f90
gcc/testsuite/gfortran.dg/char_pointer_assign.f90
gcc/testsuite/gfortran.dg/char_pointer_dependency.f90
gcc/testsuite/gfortran.dg/char_pointer_dummy.f90
gcc/testsuite/gfortran.dg/char_pointer_func.f90
gcc/testsuite/gfortran.dg/common_8.f90
gcc/testsuite/gfortran.dg/constant_substring.f
gcc/testsuite/gfortran.dg/data_char_2.f90
gcc/testsuite/gfortran.dg/der_array_io_1.f90
gcc/testsuite/gfortran.dg/der_array_io_2.f90
gcc/testsuite/gfortran.dg/der_array_io_3.f90
gcc/testsuite/gfortran.dg/der_io_3.f90
gcc/testsuite/gfortran.dg/dev_null.F90
gcc/testsuite/gfortran.dg/direct_io_2.f90
gcc/testsuite/gfortran.dg/do_iterator_2.f90
gcc/testsuite/gfortran.dg/e_d_fmt.f90
gcc/testsuite/gfortran.dg/empty_format_1.f90
gcc/testsuite/gfortran.dg/entry_17.f90
gcc/testsuite/gfortran.dg/entry_7.f90
gcc/testsuite/gfortran.dg/eor_1.f90
gcc/testsuite/gfortran.dg/equiv_2.f90
gcc/testsuite/gfortran.dg/equiv_constraint_2.f90
gcc/testsuite/gfortran.dg/equiv_substr.f90
gcc/testsuite/gfortran.dg/extended_char_comparison_1.f
gcc/testsuite/gfortran.dg/fmt_bz_bn_err.f
gcc/testsuite/gfortran.dg/fmt_error_2.f90
gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90
gcc/testsuite/gfortran.dg/fmt_tl.f
gcc/testsuite/gfortran.dg/fmt_white.f
gcc/testsuite/gfortran.dg/func_derived_1.f90
gcc/testsuite/gfortran.dg/g77/1832.f
gcc/testsuite/gfortran.dg/g77/19981216-0.f
gcc/testsuite/gfortran.dg/g77/19990525-0.f
gcc/testsuite/gfortran.dg/g77/19990826-2.f
gcc/testsuite/gfortran.dg/g77/20000630-2.f
gcc/testsuite/gfortran.dg/g77/20010116.f
gcc/testsuite/gfortran.dg/g77/20010519-1.f
gcc/testsuite/gfortran.dg/g77/980419-2.f
gcc/testsuite/gfortran.dg/g77/980520-1.f
gcc/testsuite/gfortran.dg/g77/check0.f
gcc/testsuite/gfortran.dg/g77/cpp3.F
gcc/testsuite/gfortran.dg/g77/cpp4.F
gcc/testsuite/gfortran.dg/g77/f77-edit-i-in.f
gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f
gcc/testsuite/gfortran.dg/g77/short.f
gcc/testsuite/gfortran.dg/g77_intrinsics_funcs.f
gcc/testsuite/gfortran.dg/g77_intrinsics_sub.f
gcc/testsuite/gfortran.dg/global_references_2.f90
gcc/testsuite/gfortran.dg/hollerith.f90
gcc/testsuite/gfortran.dg/hollerith_1.f90
gcc/testsuite/gfortran.dg/hollerith_f95.f90
gcc/testsuite/gfortran.dg/ichar_1.f90
gcc/testsuite/gfortran.dg/implicit_6.f90
gcc/testsuite/gfortran.dg/implicit_9.f90
gcc/testsuite/gfortran.dg/inquire.f90
gcc/testsuite/gfortran.dg/inquire_13.f90
gcc/testsuite/gfortran.dg/inquire_5.f90
gcc/testsuite/gfortran.dg/inquire_6.f90
gcc/testsuite/gfortran.dg/io_constraints_1.f90
gcc/testsuite/gfortran.dg/io_constraints_2.f90
gcc/testsuite/gfortran.dg/list_read_2.f90
gcc/testsuite/gfortran.dg/loc_2.f90
gcc/testsuite/gfortran.dg/logical_1.f90
gcc/testsuite/gfortran.dg/longline.f
gcc/testsuite/gfortran.dg/merge_char_1.f90
gcc/testsuite/gfortran.dg/namelist_12.f
gcc/testsuite/gfortran.dg/namelist_14.f90
gcc/testsuite/gfortran.dg/namelist_18.f90
gcc/testsuite/gfortran.dg/namelist_19.f90
gcc/testsuite/gfortran.dg/namelist_21.f90
gcc/testsuite/gfortran.dg/namelist_22.f90
gcc/testsuite/gfortran.dg/namelist_37.f90
gcc/testsuite/gfortran.dg/namelist_54.f90
gcc/testsuite/gfortran.dg/namelist_55.f90
gcc/testsuite/gfortran.dg/namelist_empty.f90
gcc/testsuite/gfortran.dg/namelist_use.f90
gcc/testsuite/gfortran.dg/namelist_use_only.f90
gcc/testsuite/gfortran.dg/nested_modules_4.f90
gcc/testsuite/gfortran.dg/nested_modules_5.f90
gcc/testsuite/gfortran.dg/open-options-blanks.f
gcc/testsuite/gfortran.dg/output_exponents_1.f90
gcc/testsuite/gfortran.dg/parens_5.f90
gcc/testsuite/gfortran.dg/parens_6.f90
gcc/testsuite/gfortran.dg/parent_result_ref_2.f90
gcc/testsuite/gfortran.dg/pointer_function_actual_1.f90
gcc/testsuite/gfortran.dg/pr15129.f90
gcc/testsuite/gfortran.dg/pr15332.f
gcc/testsuite/gfortran.dg/pr16597.f90
gcc/testsuite/gfortran.dg/pr17143.f90
gcc/testsuite/gfortran.dg/pr17164.f90
gcc/testsuite/gfortran.dg/pr17229.f
gcc/testsuite/gfortran.dg/pr18210.f90
gcc/testsuite/gfortran.dg/pr19155.f
gcc/testsuite/gfortran.dg/pr20086.f90
gcc/testsuite/gfortran.dg/pr20124.f90
gcc/testsuite/gfortran.dg/pr20755.f
gcc/testsuite/gfortran.dg/pr20865.f90
gcc/testsuite/gfortran.dg/pr20950.f
gcc/testsuite/gfortran.dg/pr21730.f
gcc/testsuite/gfortran.dg/pr22491.f
gcc/testsuite/gfortran.dg/pr29713.f90
gcc/testsuite/gfortran.dg/print_parentheses_1.f
gcc/testsuite/gfortran.dg/print_parentheses_2.f90
gcc/testsuite/gfortran.dg/proc_assign_1.f90
gcc/testsuite/gfortran.dg/proc_decl_1.f90
gcc/testsuite/gfortran.dg/proc_ptr_17.f90
gcc/testsuite/gfortran.dg/read_eor.f90
gcc/testsuite/gfortran.dg/read_float_1.f90
gcc/testsuite/gfortran.dg/read_logical.f90
gcc/testsuite/gfortran.dg/recursive_statement_functions.f90
gcc/testsuite/gfortran.dg/return_1.f90
gcc/testsuite/gfortran.dg/rewind_1.f90
gcc/testsuite/gfortran.dg/runtime_warning_1.f90
gcc/testsuite/gfortran.dg/scalar_return_1.f90
gcc/testsuite/gfortran.dg/stfunc_1.f90
gcc/testsuite/gfortran.dg/stfunc_3.f90
gcc/testsuite/gfortran.dg/stfunc_4.f90
gcc/testsuite/gfortran.dg/stfunc_6.f90
gcc/testsuite/gfortran.dg/streamio_2.f90
gcc/testsuite/gfortran.dg/string_ctor_1.f90
gcc/testsuite/gfortran.dg/string_null_compare_1.f
gcc/testsuite/gfortran.dg/substr_6.f90
gcc/testsuite/gfortran.dg/tl_editing.f90
gcc/testsuite/gfortran.dg/unf_io_convert_1.f90
gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
gcc/testsuite/gfortran.dg/x_slash_1.f

index d812f9db3c2d97b30529954878cce10198e8328a..45cec953230c3c3afb12e6e6af53defbd6bda798 100644 (file)
@@ -1,3 +1,16 @@
+2009-08-02  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/40881
+       * decl.c (match_char_length): Warn about old-style character length
+       declarations.
+       * match.c (match_arithmetic_if,gfc_match_if): Modify warning message
+       for arithmetic if.
+       (gfc_match_goto): Warn about computed gotos.
+       (gfc_match_return): Warn about alternate return.
+       (gfc_match_st_function): Warn about statement functions.
+       * resolve.c (resolve_fl_procedure): Modify warning message for
+       assumed-length character functions.
+
 2009-08-01  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/40011
index 392f2a57e68228cf63954216c10e7766da4a9ded..8dad9bf2594906c83bd082afe72e832e1bd6e5ef 100644 (file)
@@ -655,6 +655,9 @@ match_char_length (gfc_expr **expr)
 
   if (m == MATCH_YES)
     {
+      if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: "
+                         "Old-style character length at %C") == FAILURE)
+       return MATCH_ERROR;
       *expr = gfc_int_expr (length);
       return m;
     }
index 9de4da25b7bfc0c2d3a62a073d0e3879d08c7fcd..b9b9d54d44ee71b29211f1a3db27315937292f8e 100644 (file)
@@ -1383,8 +1383,8 @@ match_arithmetic_if (void)
       return MATCH_ERROR;
     }
 
-  if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent: arithmetic IF statement "
-                     "at %C") == FAILURE)
+  if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: Arithmetic IF "
+                     "statement at %C") == FAILURE)
     return MATCH_ERROR;
 
   new_st.op = EXEC_ARITHMETIC_IF;
@@ -1464,7 +1464,7 @@ gfc_match_if (gfc_statement *if_type)
          return MATCH_ERROR;
        }
       
-      if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent: arithmetic IF "
+      if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: Arithmetic IF "
                          "statement at %C") == FAILURE)
        return MATCH_ERROR;
 
@@ -2180,6 +2180,10 @@ gfc_match_goto (void)
   if (gfc_match (" %e%t", &expr) != MATCH_YES)
     goto syntax;
 
+  if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: Computed GOTO "
+                     "at %C") == FAILURE)
+    return MATCH_ERROR;
+
   /* At this point, a computed GOTO has been fully matched and an
      equivalent SELECT statement constructed.  */
 
@@ -2580,6 +2584,10 @@ gfc_match_return (void)
       goto cleanup;
     }
 
+  if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: Alternate RETURN "
+                     "at %C") == FAILURE)
+    return MATCH_ERROR;
+
   if (gfc_current_form == FORM_FREE)
     {
       /* The following are valid, so we can't require a blank after the
@@ -3517,6 +3525,10 @@ gfc_match_st_function (void)
 
   sym->value = expr;
 
+  if (gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: "
+                     "Statement function at %C") == FAILURE)
+    return MATCH_ERROR;
+
   return MATCH_YES;
 
 undo_error:
index 6202a2d197e0fb16d85e694d7913cd089e200b74..14a111e3ad7dedd7629af28c9a9e08f188a6ef47 100644 (file)
@@ -8289,8 +8289,8 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
       /* Appendix B.2 of the standard.  Contained functions give an
         error anyway.  Fixed-form is likely to be F77/legacy.  */
       if (!sym->attr.contained && gfc_current_form != FORM_FIXED)
-       gfc_notify_std (GFC_STD_F95_OBS, "CHARACTER(*) function "
-                       "'%s' at %L is obsolescent in fortran 95",
+       gfc_notify_std (GFC_STD_F95_OBS, "Obsolescent feature: "
+                       "CHARACTER(*) function '%s' at %L",
                        sym->name, &sym->declared_at);
     }
 
index 477f37269db4494ef68dc33a9a980fa41c7c9f78..d01a1a7b52a9e143a849074ede4b449e72954dbf 100644 (file)
@@ -1,3 +1,148 @@
+2009-08-02  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/40881
+       * gfortran.dg/aliasing_dummy_1.f90: Add -std=legacy.
+       * gfortran.dg/altreturn_3.f90: Ditto.
+       * gfortran.dg/altreturn_5.f90: Ditto.
+       * gfortran.dg/altreturn_6.f90: Ditto.
+       * gfortran.dg/altreturn_7.f90: Ditto.
+       * gfortran.dg/array_constructor_13.f90: Ditto.
+       * gfortran.dg/arrayio_7.f90: Ditto.
+       * gfortran.dg/arrayio_8.f90: Ditto.
+       * gfortran.dg/assumed_charlen_function_3.f90: Modified warning message.
+       * gfortran.dg/assumed_charlen_function_4.f90: Add -std=legacy.
+       * gfortran.dg/assumed_charlen_function_5.f90: Modified warning message.
+       * gfortran.dg/backspace_8.f: Add -std=legacy.
+       * gfortran.dg/backspace_9.f: Ditto.
+       * gfortran.dg/char_comparison_1.f: Ditto.
+       * gfortran.dg/char_decl_1.f90: Ditto.
+       * gfortran.dg/char_initialiser_actual.f90: Ditto.
+       * gfortran.dg/char_pointer_assign.f90: Ditto.
+       * gfortran.dg/char_pointer_dependency.f90: Ditto.
+       * gfortran.dg/char_pointer_dummy.f90: Ditto.
+       * gfortran.dg/char_pointer_func.f90: Ditto.
+       * gfortran.dg/common_8.f90: Ditto.
+       * gfortran.dg/constant_substring.f: Ditto.
+       * gfortran.dg/data_char_2.f90: Ditto.
+       * gfortran.dg/der_array_io_1.f90: Ditto.
+       * gfortran.dg/der_array_io_2.f90: Ditto.
+       * gfortran.dg/der_array_io_3.f90: Ditto.
+       * gfortran.dg/der_io_3.f90: Ditto.
+       * gfortran.dg/dev_null.F90: Ditto.
+       * gfortran.dg/direct_io_2.f90: Ditto.
+       * gfortran.dg/do_iterator_2.f90: Ditto.
+       * gfortran.dg/e_d_fmt.f90: Ditto.
+       * gfortran.dg/empty_format_1.f90: Ditto.
+       * gfortran.dg/entry_17.f90: Modified warning message.
+       * gfortran.dg/entry_7.f90: Add -std=legacy.
+       * gfortran.dg/eor_1.f90: Ditto.
+       * gfortran.dg/equiv_2.f90: Ditto.
+       * gfortran.dg/equiv_constraint_2.f90: Use new-style character length.
+       * gfortran.dg/equiv_substr.f90: Add -std=legacy.
+       * gfortran.dg/extended_char_comparison_1.f: Ditto.
+       * gfortran.dg/fmt_bz_bn_err.f: Ditto.
+       * gfortran.dg/fmt_error_2.f90: Ditto.
+       * gfortran.dg/fmt_read_bz_bn.f90: Ditto.
+       * gfortran.dg/fmt_tl.f: Ditto.
+       * gfortran.dg/fmt_white.f: Ditto.
+       * gfortran.dg/func_derived_1.f90: Ditto.
+       * gfortran.dg/g77_intrinsics_funcs.f: Ditto.
+       * gfortran.dg/g77_intrinsics_sub.f: Ditto.
+       * gfortran.dg/global_references_2.f90: Ditto.
+       * gfortran.dg/hollerith_1.f90: Ditto.
+       * gfortran.dg/hollerith.f90: Use new-style character length.
+       * gfortran.dg/hollerith_f95.f90: Ditto.
+       * gfortran.dg/ichar_1.f90: Add -std=legacy.
+       * gfortran.dg/implicit_6.f90: Ditto.
+       * gfortran.dg/implicit_9.f90: Ditto.
+       * gfortran.dg/inquire_13.f90: Ditto.
+       * gfortran.dg/inquire_5.f90: Ditto.
+       * gfortran.dg/inquire_6.f90: Ditto.
+       * gfortran.dg/inquire.f90: Ditto.
+       * gfortran.dg/io_constraints_1.f90: Use new-style character length.
+       * gfortran.dg/io_constraints_2.f90: Ditto.
+       * gfortran.dg/list_read_2.f90: Add -std=legacy.
+       * gfortran.dg/loc_2.f90: Ditto.
+       * gfortran.dg/logical_1.f90: Ditto.
+       * gfortran.dg/longline.f: Ditto.
+       * gfortran.dg/merge_char_1.f90: Ditto.
+       * gfortran.dg/namelist_12.f: Ditto.
+       * gfortran.dg/namelist_14.f90: Ditto.
+       * gfortran.dg/namelist_18.f90: Ditto.
+       * gfortran.dg/namelist_19.f90: Ditto.
+       * gfortran.dg/namelist_21.f90: Ditto.
+       * gfortran.dg/namelist_22.f90: Ditto.
+       * gfortran.dg/namelist_37.f90: Ditto.
+       * gfortran.dg/namelist_54.f90: Ditto.
+       * gfortran.dg/namelist_55.f90: Ditto.
+       * gfortran.dg/namelist_empty.f90: Ditto.
+       * gfortran.dg/namelist_use.f90: Use new-style character length.
+       * gfortran.dg/namelist_use_only.f90: Add -std=legacy.
+       * gfortran.dg/nested_modules_4.f90: Ditto.
+       * gfortran.dg/nested_modules_5.f90: Ditto.
+       * gfortran.dg/open-options-blanks.f: Ditto.
+       * gfortran.dg/output_exponents_1.f90: Ditto.
+       * gfortran.dg/parens_5.f90: Ditto.
+       * gfortran.dg/parens_6.f90: Ditto.
+       * gfortran.dg/parent_result_ref_2.f90: Modified warning message.
+       * gfortran.dg/pointer_function_actual_1.f90: Add -std=legacy.
+       * gfortran.dg/pr15129.f90: Ditto.
+       * gfortran.dg/pr15332.f: Ditto.
+       * gfortran.dg/pr16597.f90: Ditto.
+       * gfortran.dg/pr17143.f90: Ditto.
+       * gfortran.dg/pr17164.f90: Ditto.
+       * gfortran.dg/pr17229.f: Modified warning message.
+       * gfortran.dg/pr18210.f90: Add -std=legacy.
+       * gfortran.dg/pr19155.f: Ditto.
+       * gfortran.dg/pr20086.f90: Ditto.
+       * gfortran.dg/pr20124.f90: Ditto.
+       * gfortran.dg/pr20755.f: Ditto.
+       * gfortran.dg/pr20865.f90: Ditto.
+       * gfortran.dg/pr20950.f: Ditto.
+       * gfortran.dg/pr21730.f: Ditto.
+       * gfortran.dg/pr22491.f: Ditto.
+       * gfortran.dg/pr29713.f90: Ditto.
+       * gfortran.dg/print_parentheses_1.f: Ditto.
+       * gfortran.dg/print_parentheses_2.f90: Ditto.
+       * gfortran.dg/proc_assign_1.f90: Ditto.
+       * gfortran.dg/proc_decl_1.f90: Ditto.
+       * gfortran.dg/proc_ptr_17.f90: Add dg-warning.
+       * gfortran.dg/read_eor.f90: : Add -std=legacy.
+       * gfortran.dg/read_float_1.f90: Ditto.
+       * gfortran.dg/read_logical.f90: Ditto.
+       * gfortran.dg/recursive_statement_functions.f90: Ditto.
+       * gfortran.dg/return_1.f90: Ditto.
+       * gfortran.dg/rewind_1.f90: Ditto.
+       * gfortran.dg/runtime_warning_1.f90: Use new-style character length.
+       * gfortran.dg/scalar_return_1.f90: Add -std=legacy.
+       * gfortran.dg/stfunc_1.f90: Ditto.
+       * gfortran.dg/stfunc_3.f90: Ditto.
+       * gfortran.dg/stfunc_4.f90: Ditto.
+       * gfortran.dg/stfunc_6.f90: Ditto.
+       * gfortran.dg/streamio_2.f90: Ditto.
+       * gfortran.dg/string_ctor_1.f90: Ditto.
+       * gfortran.dg/string_null_compare_1.f: Ditto.
+       * gfortran.dg/substr_6.f90: Ditto.
+       * gfortran.dg/tl_editing.f90: Ditto.
+       * gfortran.dg/unf_io_convert_1.f90: Use new-style character length.
+       * gfortran.dg/warnings_are_errors_1.f90: Modified warning message.
+       * gfortran.dg/x_slash_1.f: Add -std=legacy.
+       * gfortran.dg/g77/1832.f: Ditto.
+       * gfortran.dg/g77/19981216-0.f Ditto.
+       * gfortran.dg/g77/19990525-0.f: Ditto.
+       * gfortran.dg/g77/19990826-2.f: Ditto.
+       * gfortran.dg/g77/20000630-2.f: Ditto.
+       * gfortran.dg/g77/20010116.f: Ditto.
+       * gfortran.dg/g77/20010519-1.f: Use new-style character length.
+       * gfortran.dg/g77/980419-2.f: Add -std=legacy.
+       * gfortran.dg/g77/980520-1.f: Ditto.
+       * gfortran.dg/g77/check0.f: Ditto.
+       * gfortran.dg/g77/cpp3.F: Ditto.
+       * gfortran.dg/g77/cpp4.F: Use new-style character length.
+       * gfortran.dg/g77/f77-edit-i-in.f: Add -std=legacy.
+       * gfortran.dg/g77/f77-edit-t-in.f: Ditto.
+       * gfortran.dg/g77/short.f: Ditto.
+
 2009-08-01  Adam Nemet  <anemet@caviumnetworks.com>
 
        * gcc.target/mips/ext-3.c: Add NOMIPS16.
index 0d0b588fc105c30387e9eb8947c8332d25e015b7..686853a1c08ebf9f4bf636f57d6bfd732cbf793e 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! This tests the fix for PR24276, which originated from the Loren P. Meissner example,
 ! Array_List.  The PR concerns dummy argument aliassing of components of arrays of derived
 ! types as arrays of the type of the component.  gfortran would compile and run this
@@ -61,4 +63,5 @@ contains
     write (slist(1,1), '(2hi=,i3)') i
   end subroutine foo3
 
-end program test_lex
\ No newline at end of file
+end program test_lex
+
index 999ada87a0758c6287af9a961dddb7be9458856d..daa09017859b6b8865b9d44070674971f7ba4cbb 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR30236, which was due to alternate returns
 ! in generic interfaces causing a segfault.  They now work
 ! correctly.
index ff1b82289f6587ff5765d2547dc3ff5ebe2bde1c..a8b6ff83cd12b1cb039317afc69f73f4fe74d9fc 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR31483, in which dummy argument procedures
 ! produced an ICE if they had an alternate return.
 !
index 61f5f605990eb47df560ce1f1c21992677ca844a..19c851e5092f2a328c29713156aa7a621c9c2be0 100644 (file)
@@ -1,3 +1,6 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR 32938
 subroutine r (*)
   integer(kind=8) :: i
index 6eb0c78bde7d2e065a17dc835c29c80a07c86695..d1786d038c8cdfeff7ba5b38ccb1abaf441e86b8 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
 !
 ! PR 40848: [4.5 Regression] ICE with alternate returns
 !
index bacc6fffc38f0c1aad254df1cb83da12dac79738..74f3d497a751944edccb76e6bdd9eaf32728fe64 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests patch for PR29431, which arose from PR29373.
 !
 ! Contributed by Tobias Schlueter  <tobi@gcc.gnu.org>
index 69581763a643697e8984017a911a057e773255d8..68d1fbf97e69aa8e80803390b0ff5730e9ff972d 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR24224 Test formatted input/output to/from character arrays with strides
 ! other than 1.  Test that reading stops at the end of the current record.
 ! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
index 9dc81f82da1341fce3eb17db661482c11956ff3c..7b609bd061cdba905edc6164d497c51e69146487 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR28339, This test checks that internal unit array I/O handles a full record
 ! and advances to the next record properly.  Test case derived from PR
 ! Submitted by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
index 09c9be97c0309326e192a0cda34af539be5c52d7..912126fe72ac5c437c851d42593ee7fa53faa7ed 100644 (file)
@@ -5,13 +5,13 @@
 !\r
 ! Contributed by Paul Thomas  <pault@gcc.gnu.org>\r
 !\r
-function is_OK (ch)                ! { dg-warning "is obsolescent in fortran 95" }\r
+function is_OK (ch)                ! { dg-warning "Obsolescent feature" }\r
   character(*) is_OK, ch           ! OK in an external function\r
   is_OK = ch\r
 end function is_OK\r
 \r
 ! The warning occurs twice for the next line; for 'more_OK' and for 'fcn';\r
-function more_OK (ch, fcn)         ! { dg-warning "is obsolescent in fortran 95" }\r
+function more_OK (ch, fcn)         ! { dg-warning "Obsolescent feature" }\r
   character(*) more_OK, ch\r
   character (*), external :: fcn   ! OK as a dummy argument\r
   more_OK = fcn (ch)\r
index 9c96ba4d69fa705a9395fb3abcd76ffd64fb5124..c8f804465b7c5da676e08be1a49fb29205ade0d8 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR28600 in which the declaration for the
 ! character length n, would be given the DECL_CONTEXT of 'gee'
 ! thus causing an ICE.
index cc7e0108db915625c232800fa479eddef7ba4e4a..8a0788978afa341edd10efb62d6571917ae3bcdc 100644 (file)
@@ -5,14 +5,14 @@
 !
 ! Contributed by Paul Thomas  <pault@gcc.gnu.org>
 !
-character(*) function charrext (n)  ! { dg-warning "is obsolescent in fortran 95" }
+character(*) function charrext (n)  ! { dg-warning "Obsolescent feature" }
   character(26) :: alpha ="abcdefghijklmnopqrstuvwxyz"
   charrext = alpha (1:n)
 end function charrext
 
   character(26), external :: charrext
   interface
-    integer(4) function test(charr, i)  ! { dg-warning "is obsolescent in fortran 95" }
+    integer(4) function test(charr, i)  ! { dg-warning "Obsolescent feature" }
      character(*), external :: charr
      integer :: i
     end function test
@@ -23,7 +23,7 @@ end function charrext
     m = ctest (charrext, 27 - j)
   end do
 contains
-  integer(4) function ctest(charr, i)  ! { dg-warning "is obsolescent in fortran 95" }
+  integer(4) function ctest(charr, i)  ! { dg-warning "Obsolescent feature" }
     character(*) :: charr
     integer :: i
     print *, charr(i)
@@ -31,7 +31,7 @@ contains
   end function ctest
 end
 
-integer(4) function test(charr, i)  ! { dg-warning "is obsolescent in fortran 95" }
+integer(4) function test(charr, i)  ! { dg-warning "Obsolescent feature" }
   character(*) :: charr
   integer :: i
   print *, charr(i)
index 8c8c96aaceca1366f4bca1e7cf1b342533218805..2dd6b72e9d938789f6ffd32042f987d5da66dc41 100644 (file)
@@ -1,4 +1,6 @@
 C { dg-do run }
+C { dg-options "-std=legacy" }
+C
 C PR libfortran/31618 - backspace after an error didn't work.
       program main
       character*78 msg
index fe62ea5a6e0363a782dab7fffca4967655cf640a..851f518a2a94dc5da9362bd02c6c56ae332fa8a1 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR32235 incorrectly position text file after backspace
 ! Test case from PR, prepared by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
       program main
index 9a316b74f7d3b5f4e1ae37d82afa2aeb79558c31..02f69e07661a92e53fa31bae966c337046320923 100644 (file)
@@ -1,4 +1,6 @@
 C { dg-do run }
+C { dg-options "-std=legacy" }
+C
 C     PR 30525 - comparisons with padded spaces were done
 C     signed.
       program main
index 7ce6974f6889d4777d9c0b86107f5b3c3db7da44..3bef08342eed7effe1b476a62bff871542f6f9c8 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR32644 "CHARACTER*1, c" produces "Unclassifiable statement"
 program f
 character*1, c
index 920e106601483afd27265c7e03d2fdda03d8bc4d..d123aca136d6b120a631bbc6b25644521db4884f 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Tests passing of character array initialiser as actual argument.
 ! Fixes PR18109.
 ! Contributed by Paul Thomas pault@gcc.gnu.org  
index ee3da5245286771cef9ce341da8fb95300cc815c..62fcf0360a325859e01b1b13819175b77b822db3 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 program char_pointer_assign\r
 ! Test character pointer assignments, required\r
 ! to fix PR18890 and PR21297\r
@@ -38,4 +40,5 @@ program char_pointer_assign
   if (any (t2 /= "lnmo")) call abort ()\r
   if (any (c2 /= "onml")) call abort ()\r
   deallocate (c3, c4)\r
-end program char_pointer_assign
\ No newline at end of file
+end program char_pointer_assign
+
index 94976cbb33c63b6c17145ce2a0e763f12588b191..ef2d783e1ffbb1e28eed3f77a08565c61178502b 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Test assignments from character pointer functions with dependencies
 ! are correctly resolved.
 ! Provided by Paul Thomas pault@gcc.gnu.org
index 1935de51113818044c4c0fa98f201bcbfd4d7a72..b533a1cb98c7caf34aa0bb5adeacaa2aae586ac1 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 program char_pointer_dummy\r
 ! Test character pointer dummy arguments, required\r
 ! to fix PR16939 and PR18689\r
@@ -30,4 +32,5 @@ contains
     character*4, pointer       :: ac1(:)\r
     if (ac1(1) /= "wxyz") call abort ()\r
   end subroutine afoo\r
-end program char_pointer_dummy
\ No newline at end of file
+end program char_pointer_dummy
+
index ddca76f40b211b6baf4b3c428653404cb4669dd7..23f867eeb45b244e9979e20786aae4da154f8a0a 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 program char_pointer_func
 ! Test assignments from character pointer functions, required
 ! to fix PR17192 and PR17202
index 5d08fcdee22765cf792d244cf396dcc64eeffebc..ada4408f5d6c5228f1fb653121baaab09d4e0a6b 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
 !
 ! PR fortran/25062
 !
index c3aff4848e16e87a1ea8b2c1d137c3f12f469a04..4ca11bc160a8c1ba0cbb7193c2f5905a3915eaa6 100644 (file)
@@ -1,5 +1,7 @@
 ! Simplify constant substring
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*2 a
       character*4 b
       character*6 c
index 3e021b165f796581cf78d70a77b834640e4df128..26e31a14f082b36f4ef6d1ab02dc6a6b23873acb 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 !  Test that getting a character from a
 ! string data works.
 
index b43864d6e1477e61e0022c5b84eb64c2cebc53b8..244b600746c615bec97d4b34ff6b13eea2c0fc1c 100644 (file)
@@ -1,5 +1,7 @@
 ! Test IO of arrays of integers in derived types
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 program main
 
   character* 10000 :: buf1, buf2
index c62fd1eb1a02e18ab2c229cbdfdbfec9b11dc0df..21e10d21306032011304f4e781912ea467b217d6 100644 (file)
@@ -1,5 +1,7 @@
 ! Test IO of arrays in derived type arrays
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 program main
 
   character *1000 buf1, buf2
index ae89b3dce7853a3398c153eef9e41c6964b5bfe0..de562152c4958937699647633e63d3bccd96ef76 100644 (file)
@@ -1,5 +1,7 @@
 ! Test IO of character arrays in derived types.
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 program main
  character*1000 buf1, buf2
  type :: foo_type
index 01066cf56e4c58bb0c28bde9dc55f5e977fa9d39..1cb370ce17c73bfc887db2dc015f6a72e6602400 100644 (file)
@@ -1,3 +1,6 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR23843
 ! Make sure derived type I/O with PRIVATE components works where it's allowed
 module m1
index 2385e19ee6c7fe63b4629e1b3ad2e92591052eaa..b8ba5748593736cf65f034b3cdcd51e55b135e6b 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! pr19478 read from /dev/null
 ! Thomas.Koenig@online.de
 #if defined  _WIN32
index cc20f96eedd2e8f5ad2442f5d0cba45132efb703..8e18052ff011f12d2d623e7dd1c54f6935cef759 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
 !
 ! this testcase derived from NIST test FM413.FOR
 ! tests writing direct access files in ascending and descending
index 38f59b5e034a642d09c664941c18a986c7e8d4bd..7422b9eb575e0b401dd0172bb74481036c598f86 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for pr32613 - see:
 ! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/495c154ee188d7f1/ea292134fe68b1d0#ea292134fe68b1d0
 !
index d463d89d6f13266124d6a9a919678559d5ba1d88..f2a3a5fc553e454298ab471767d20adb630dc4a9 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Verify that the D format uses 'D' as the exponent character.
 !   "     "    "  E   "     "   'E' "   "     "         " 
 CHARACTER*10 c1, c2
index 79a2d0c17d745bf6f208e48f1d2543d233512b0d..ad60afa3f47c986e303e62c38b498c21bf579303 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 17709
 ! We weren't resetting the internal EOR flag correctly, so the second read
 ! wasn't advancing to the next line.
index d466266cec3d3168505d92da80080da1ed227553..22aabb3a88f8cba99c4416ba570365a78a80bfe2 100644 (file)
@@ -17,19 +17,19 @@ entry bar2()
   bar2 = ""
 end function test2
 
-function test3() ! { dg-warning "is obsolescent" }
+function test3() ! { dg-warning "Obsolescent feature" }
   character(*) :: test3
-  character(*) :: bar3 ! { dg-warning "is obsolescent" }
+  character(*) :: bar3 ! { dg-warning "Obsolescent feature" }
   test3 = ""
   return
 entry bar3()
   bar3 = ""
-end function test3 ! { dg-warning "is obsolescent" }
+end function test3 ! { dg-warning "Obsolescent feature" }
 
 function test4(n) ! { dg-error "returning variables of different string lengths" }
   integer  :: n
   character(n) :: test4
-  character(*) :: bar4 ! { dg-warning "is obsolescent" }
+  character(*) :: bar4 ! { dg-warning "Obsolescent feature" }
   test4 = ""
   return
 entry bar4()
@@ -45,11 +45,11 @@ entry bar5()
   bar5 = ""
 end function test5
 
-function test6() ! { dg-warning "is obsolescent|returning variables of different string lengths" }
+function test6() ! { dg-warning "Obsolescent feature|returning variables of different string lengths" }
   character(*) :: test6
   character(2) :: bar6
   test6 = ""
   return
 entry bar6()
   bar6 = ""
-end function test6 ! { dg-warning "is obsolescent" }
+end function test6 ! { dg-warning "Obsolescent feature" }
index 529409845519daed74a34925efc932aa2b212e7f..b011fe63bfd44adff8165725411d7ebddeefd2a8 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Check that PR20877 and PR25047 are fixed by the patch for
 ! PR24558. Both modules would emit the error:
 ! insert_bbt(): Duplicate key found!
index dd3b5e98f703426ee50c93114089c5cc60fe944f..cd0004bb2a702e8e326bc5d9ed027e9a54bb0206 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 19451: The test for advance='NO' with eor used to be reversed.
 program main
   character*2 c
index 8bc7fb14ac7ec6c783e89d25eba8e8536915ff7c..ee671f964fdfd3dfc48618cc29a49a731848b6ba 100644 (file)
@@ -1,3 +1,6 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
       subroutine broken_equiv1
       character*4 h
       character*3 i
index d721f967137deda435ae9b84f2b614c211574110..8a4e0b5ff85ec88af89b97cbccde6a7b0ad3f401 100644 (file)
@@ -30,8 +30,8 @@
 
   type       :: char_type
     sequence
-    character*4 :: ch
-    character*4 :: cha (6)
+    character(4) :: ch
+    character(4) :: cha (6)
   end type char_type
 
   type (char_type) ::  my_char
@@ -39,7 +39,7 @@
   type       :: mixed_type
     sequence
     integer     :: i(4)
-    character*4 :: cha (6)
+    character(4) :: cha (6)
   end type mixed_type
 
   type (mixed_type) ::  my_mixed, thy_mixed
index cd186cf001553dd3bd69c533c10f011455d0a7cc..bad3a3a20e88b542c47e8c208193202bb236a2b0 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
 !
 ! PR fortran/34557
 !
index 311567dceb0c2f4b5d1f57c4d4d8568a4d6a9cf8..b3d7c0456209d7be1983e5adba7b636f29396581 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 27715 - the front end and the library used to have different ideas
 ! about ordering for characters whose encoding is above 127.
 
index 36881f85dc7eee65df63f7089d2e3e3d08b20fd8..579ab26f4d9f0b36be990c5791f46019a6de5973 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR38772 r143102 reveals missed error checking on floating point reads.
 ! Test case contributed by Jack Howarth.
       program badread
index 8fdaf9e3f2199118d3ecda5f651e27d61894d807..ae818da7f04952e90d40731ef7294b3afa4eafe3 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR 33269: we used to not simplify format strings before checking if
 ! they were valid, leading to a missed error.
 
index d0d01937ea2227c61c6159c2f54fd50941ae1565..5eea29a6c1448246d70219a1d8538d1031acb45c 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Test various uses of BZ and BN format specifiers.
 ! Portions inspired by NIST F77 testsuite FM711.f
 ! Contributed by jvdelisle@verizon.net
index d79146ff02ffdb8d73e422c5aa8e32737301c5a1..656499ed05ef069b4f749c1b8e3d3b2bd82f22f8 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR25631 Check that TL editing works for special case of no bytes written yet.
 ! Contributed by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
       real x
index bcd056f7fb9ca580316b1f705fb3e300f2868bfb..6921a722f6a87b57a47059509683fb237268d082 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR24268 Test case derived from example given by Iwan Kawrakow
 ! Embedded spaces in format strings should be ignored.
 ! Prepared by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
index 496d2905c39acef54c391a5d3a9879612e545ea0..2cf8e449c7e66ebea6a32baacad293056035d6fa 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 17244
 ! verifies that functions returning derived type work
 module m
index 1d2ad92add46a2a522e7d59f89d30fc83528b7c1..6b7617d62e09972d9ffaeafabaa710e2ca77e4e6 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*5   string
       write(string, *) "a "
       if (string .ne. ' a') call abort
index 1e5db3c3b5c6172913fffa6b44ce929ad90c9ff7..82d259d3cb5d6b6512c11d0c7a1208694e1bb3cf 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do compile }
+c { dg-options "-std=legacy" }
+c
 * Resent-From: Craig Burley <burley@gnu.org>
 * Resent-To: craig@jcb-sc.com
 * X-Delivered: at request of burley on mescaline.gnu.org
index 589fb8ebfd152bc714124fec0f33276bc19bb115..4eb104cdbe23a61b9260af35376a23011aeacd4a 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do compile }
+c { dg-options "-std=legacy" }
+c
 * Mailing-List: contact egcs-bugs-help@egcs.cygnus.com; run by ezmlm
 * Precedence: bulk
 * Sender: owner-egcs-bugs@egcs.cygnus.com
index b8384f8d25ab742ff58b13acf6fc7919bf68d0d7..8870c2588d40e68e62bc675b377af7b7905a4cbf 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run }
+c { dg-options "-std=legacy" }
+c
 * From: "Billinghurst, David (RTD)" <David.Billinghurst@riotinto.com.au>
 * Subject: RE: single precision complex bug in g77 - was Testing g77 with LA
 * PACK 3.0
index b2776bf6bed096c493e7f410dee2eb8c94bdce4e..4948c49e4944966ee59f48412f9c4a032da38d41 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do compile }
+c { dg-options "-std=legacy" }
+c
       SUBROUTINE CHOUT(CHR,ICNT)
 C ICE: failed assertion `expr != NULL'
 C Reduced version of GNATS PR fortran/329 from trond.bo@dnmi.no
index dd8ee931297b6580aecf714d741da9207fe3d8ab..ca7375d0f688e0d475a8e721c1af6bf157f03cf1 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run }
+c { dg-options "-std=legacy" }
+c
 *
 *  Derived from LAPACK 3.0 routine CHGEQZ
 *  Fails on i686-pc-cygwin with gcc-2.97 snapshots at -O2 and higher
index beead98c7b94736c53e0d8fc0d072f33d2786a75..c268bf03eb58c1f37481c488b0fd7bc635fe2d5c 100644 (file)
@@ -340,10 +340,10 @@ C..##IF ACE
 C..##ENDIF
 C..##IF ADUMB
 C..##ENDIF
-      CHARACTER*4 GTRMA, NEXTA4, CURRA4
-      CHARACTER*6 NEXTA6
-      CHARACTER*8 NEXTA8
-      CHARACTER*20 NEXT20
+      CHARACTER(4) GTRMA, NEXTA4, CURRA4
+      CHARACTER(6) NEXTA6
+      CHARACTER(8) NEXTA8
+      CHARACTER(20) NEXT20
       INTEGER     ALLCHR, ALLSTK, ALLHP, DECODI, FIND52,
      *            GETATN, GETRES, GETRSN, GETSEG, GTRMI, I4VAL,
      *            ICHAR4, ICMP16, ILOGI4, INDX, INDXA, INDXAF,
@@ -390,11 +390,11 @@ C..##ENDIF
 C..##IF MMFF
       INTEGER LEN_TRIM
       EXTERNAL LEN_TRIM
-      CHARACTER*4 AtName
+      CHARACTER(4) AtName
       external AtName
-      CHARACTER*8 ElementName
+      CHARACTER(8) ElementName
       external ElementName
-      CHARACTER*10 QNAME
+      CHARACTER(10) QNAME
       external QNAME
       integer  IATTCH, IBORDR, CONN12, CONN13, CONN14
       integer  LEQUIV, LPATH
@@ -576,7 +576,7 @@ C..##ENDIF
      &            PIXX = 28, PIXY = 29, PIXZ = 30, PIYX = 31,
      &            PIYY = 32, PIYZ = 33, PIZX = 34, PIZY = 35,
      &            PIZZ = 36)
-      CHARACTER*4  CEPROP, CETERM, CEPRSS
+      CHARACTER(4)  CEPROP, CETERM, CEPRSS
       COMMON /ANER/ CEPROP(LENENP), CETERM(LENENT), CEPRSS(LENENV)
       LOGICAL  QEPROP, QETERM, QEPRSS
       COMMON /QENER/ QEPROP(LENENP), QETERM(LENENT), QEPRSS(LENENV)
@@ -653,7 +653,7 @@ C:::##INCLUDE '~/charmm_fcm/ctitla.fcm'
       INTEGER MAXTIT
       PARAMETER (MAXTIT=32)
       INTEGER NTITLA,NTITLB
-      CHARACTER*80 TITLEA,TITLEB
+      CHARACTER(80) TITLEA,TITLEB
       COMMON /NTITLA/ NTITLA,NTITLB
       COMMON /CTITLA/ TITLEA(MAXTIT),TITLEB(MAXTIT)
 C..##IF SAVEFCM
index defda413eb78068b2d19dbdf3b5c0c019d9c7797..bb02862e30c4b15c97c3b18935b54e902297fce6 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do compile }
+c { dg-options "-std=legacy" }
+c
 c     SEGVs in loop.c with -O2.
 
       character*80 function nxtlin(lun,ierr,itok)
index edf7241b9974fbef869999b99dcc7ac6be473b36..855b9a442d70c1f826771565fffbcb9755063eb6 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run }
+c { dg-options "-std=legacy" }
+c
 c     Produced a link error through not eliminating the unused statement
 c     function after 1998-05-15 change to gcc/toplev.c.  It's in
 c     `execute' since it needs to link.
index 3febba9d02a2910ab824da9c35a76157468ce0fd..f0a14f826cf3dba41b7640fd1491c24b30f31f45 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do compile }
+c { dg-options "-std=legacy" }
+c
 CCC Abort fixed by:
 CCC1998-04-21  Jim Wilson  <wilson@cygnus.com>
 CCC
index 383877370922e696a5cf3f8a5f64154ab50ef073..ab25b532945782a21bcce1f21613fea88ddc7541 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run }
+c { dg-options "-std=legacy" }
+c
 !  Some versions of cpp will delete "//'World' as a C++ comment.
       character*40    title
       title = 'Hello '//'World'
index 0dd5c99edc2c920a0b6a3512e73dff0605a18986..bc14e0469ea94add30f8306136cb4d91fbee6d7d 100644 (file)
@@ -1,8 +1,8 @@
-      ! { dg-do run }
+c { dg-do run }
 C The preprocessor must not mangle Hollerith constants
 C which contain apostrophes.
       integer i
-      character*4 j
+      character(4) j
       data i /4hbla'/
       write (j, '(4a)') i
       if (j .ne. "bla'") call abort
index 49eb41608bb2aaae7638f35005b92485f53758d4..0369b79db330f8f11e28494c1f4d9880c5e881cd 100644 (file)
@@ -4,6 +4,8 @@ C
 C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
 C
 C { dg-do run }
+C { dg-options "-std=legacy" }
+C
 
       integer i,j
       character*10 buf
index 2314080d70862847d0566cf430f893b6dadb14b0..524b18e317970fbd5fe43ca9134f45149536b6de 100644 (file)
@@ -4,6 +4,8 @@ C
 C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
 C
 C { dg-do run }
+C { dg-options "-std=legacy" }
+C
       integer i,j
       real a,b,c,d,e
       character*32 in
index e9a18a1315be0dba8cdc3aba3d1ceaafca6fbff4..330f0ac52b15d68bfa547c014e5e9d03efdfbc23 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run }
+c { dg-options "-std=legacy" }
+c
       program short
 
       parameter   (   N=2  )
index 551bd61cd6508548888960dbbb86238ad0bbff05..f9e0195bcdbd60c55331ed213f85ad4dcaab0e8f 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Testing g77 intrinsics as subroutines
       integer(kind=8) i8
       integer i4
index d1591e04beffb04302ed45fbcab5480ca84a7c25..6ee5f837cc49228edd22131cedcb25b45cfde1f0 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Testing g77 intrinsics as subroutines
       integer(kind=8) i8, j8
       integer i4, j4
index 95666981ac0bc6541a6eeed18dc777c1a385cda2..bf2528006a07e193db61881313eb6b1b7bc372b4 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! This program tests the patch for PR25964. This is a
 ! regression that would not allow a common block and a statement
 ! to share the same name.
@@ -7,4 +9,5 @@
   common /foo/ a, b, c
   foo (x) = x + 1.0
   print *, foo (0.0)
-  end
\ No newline at end of file
+  end
+
index 21cbf66bdf6dc0ea3db0a776148f20df48153273..697ed22d8925e2b22d85c1a154ce09a77558f04b 100644 (file)
@@ -3,14 +3,14 @@
 implicit none
 complex(kind=8) x(2) 
 complex a(2,2)
-character*4 z
+character(4) z
 character z1(4)
-character*4 z2(2,2)
-character*80 line
+character(4) z2(2,2)
+character(80) line
 integer i
 integer j
 real r
-character*8 c
+character(8) c
 
 data x /16Habcdefghijklmnop, 16Hqrstuvwxyz012345/
 data a /8H(i3),abc, 0, 4H(i4), 8H    (i9)/
@@ -53,7 +53,7 @@ end
 
 subroutine test (h)
 integer(kind=8) h
-character*80 line
+character(80) line
 
 write (line, '(8a)') h
 if (line .ne. '   hello') call abort
index d6732d40b693cb65a07df6d60e8e50f8a1edb793..829ca7f99c285b36499e7bfc4cd38605170f157a 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 21260
 ! We wrongly interpreted the '!' as the beginning of a comment.
 ! Also verifies the functioning of hollerith formatting.
index 4d7fda8c72e537be87660fd5ca31ebfc2e8116f5..dc52187adb91306eb6dda55aed0762331cde10a2 100644 (file)
@@ -4,14 +4,14 @@
 implicit none
 complex(kind=8) x(2) 
 complex a(2,2)
-character*4 z
+character(4) z
 character z1(4)
-character*4 z2(2,2)
-character*80 line
+character(4) z2(2,2)
+character(80) line
 integer i
 logical l
 real r
-character*8 c
+character(8) c
 
 data x /16Habcdefghijklmnop, 16Hqrstuvwxyz012345/
 data a /8H(i3),abc, 0, 4H(i4), 8H    (i9)/
@@ -54,7 +54,7 @@ end
 
 subroutine test (h)
 integer(kind=8) h
-character*80 line
+character(80) line
 
 write (line, '(8a)') h
 if (line .ne. '   hello') call abort
index 104c5d166af5023fe88f950db441c3ab807a1ba4..362cd2f453bdb702ed590d1ce57d3226bd081a45 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR20879
 ! Check that we reject expressions longer than one character for the
 ! ICHAR and IACHAR intrinsics.
index bb7fe3221abdd19aa044d1876fc32db0486674b2..a74ecc29ba5e92d66203b732f555e36166b94248 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR 24643
 ! substring references on implicitly typed CHARACTER variables didn't work
         PROGRAM P
index 335c85bffb17ea06f3f5684dee2255400761af39..04b7afa4ed82b98b11ebbc7878dd493d7746e70c 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests patch for PR29373, in which the implicit character
 ! statement messes up the function declaration because the
 ! requisite functions in decl.c were told nothing about
index 9f3b72532af9c4e74189b2b444d79f040d2aca66..7115913c6c6346b089e0fbdda9a8f9a6089a4788 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! check to see that you cannot open a direct access file
 ! for sequential i/o.
 ! derived from NIST test fm910.for
index 366e383327f2e7ea74778700ca21b211e8afe9af..d074861a97b9858f4f0913ef8c66c96bd683b325 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR34795 inquire statement , direct= specifier incorrectly returns YES
 ! Test case from PR, modified by Jerry DeLisle  <jvdelisle@gcc.gnu.org
 program testinquire
index b2e07be9319c25cee214a9b69d9e4f8be99484f1..fe107a1986347376313c20ffbae5b2350ea8c374 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run { target fd_truncate } }
+! { dg-options "-std=legacy" }
+!
 ! pr19314 inquire(..position=..) segfaults
 ! test by Thomas.Koenig@online.de
 !         bdavis9659@comcast.net
index 7575b6e67b3039ba7d8cef2ce6d63c44b925d552..b657df831d9cb10dd2c744450c64f5018a3fd4c1 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 !pr19313 - inquire(..pad=..)
       implicit none
 !     logical debug
index 5f2c776b12876332cd86fe9cc1e1b25f75694bc5..db1e949e7a59381761a5db7bc76ba81a5758b18a 100644 (file)
@@ -29,7 +29,7 @@ end module global
  use global
  integer :: a,b, c(20)
  integer(8) :: ierr
- character*80 :: buffer(3)
+ character(80) :: buffer(3)
 
 ! Appending to a USE associated namelist is an extension.
 
index 8bf48d72ff20c4927b31a2302e1d19877d1256aa..8d3ae6b45f4382159d82df9f8c15678413be9c81 100644 (file)
@@ -25,7 +25,7 @@ end module global
  use global
  integer :: a,b, c(20)
  integer(8) :: ierr
- character*80 :: buffer(3)
+ character(80) :: buffer(3)
 
 
 ! Appending to a USE associated namelist is an extension.
index e757f613e4401b82ec02d02dcc6e4fa7503c23a6..3e6c233c09a7e040b0aac8fc5364799ffb517f71 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR16805
 ! Test list directed reads from character substrings
 ! The IO library was reporting an error rather the end-of-record when it
index 196dcc6db74dce1effe9750127e4d79f725269ba..d905fc0f74b24a783311ebad77c495bbe4aa0156 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Series of routines for testing a loc() implementation
 program test
   common /errors/errors(12)
index 3edc74441b2d8de3e562a93615a234f4cbcc6d55..69d9e6a437eec2a17b00247ae44bb3b2d4ba014c 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR middle-end/19543
 program logical_1
   implicit none
index ffd5a4bb2afbedf374c0719f0954c041cf72e79c..c2a5f5afd70a602e4a608b52c7b0e9522ef68a99 100644 (file)
@@ -1,5 +1,6 @@
 # 1 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.f"
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
 
       subroutine foo
       character*10 cpnam
index 0a8036d62df643018ca1b2c30bbd81f1128444a7..5974e8c06c389387cdaa230d60717b104675d57f 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 15327
 ! The merge intrinsic didn't work for strings
 character*2 :: c(2)
index dca96452e21b3c7f6873afc7cf2cfbdc337195ae..1752bfa07df17952c72417094b0c7bd2d95ec743 100644 (file)
@@ -1,4 +1,6 @@
 c{ dg-do run { target fd_truncate } }
+c{ dg-options "-std=legacy" }
+c
 c This program repeats many of the same tests as test_nml_1 but for integer
 c instead of real. It also tests repeat nulls, comma delimited character read,
 c a triplet qualifier, a range with an assumed start, a quote delimited string,
index 729f1b2d5c4f030efbb0cf0907775f3b3b464f57..478e07fe67fe038e1fd577b6de7432a807b9cbbd 100644 (file)
@@ -1,4 +1,6 @@
 !{ dg-do run }
+!{ dg-options "-std=legacy" }
+!
 ! Tests various combinations of intrinsic types, derived types, arrays,
 ! dummy arguments and common to check nml_get_addr_expr in trans-io.c.
 ! See comments below for selection.
index d54d91f9a05b70bef73017b649e587763d739e94..87b66012d4c73ff00a0129769d2cd8c358b9982b 100644 (file)
@@ -1,4 +1,6 @@
 !{ dg-do run }
+!{ dg-options "-std=legacy" }
+!
 ! Tests character delimiters for namelist write 
 ! provided by Paul Thomas - pault@gcc.gnu.org
 
index c06abf5295beec9b7894ed76597963903bba8649..4821033ecd7cc43d195327345a9ee6a8253cc73a 100644 (file)
@@ -1,4 +1,6 @@
 !{ dg-do run }
+!{ dg-options "-std=legacy" }
+!
 ! Test namelist error trapping.
 ! provided by Paul Thomas - pault@gcc.gnu.org
 
index 8d2852d2cca1e95d3e0a9b2d5ca83748c5050f67..de88200c167a282876b4f62a2649583406416cbc 100644 (file)
@@ -1,4 +1,6 @@
 !{ dg-do run { target fd_truncate } }
+!{ dg-options "-std=legacy" }
+!
 ! Tests filling arrays from a namelist read when object list is not complete.
 ! Developed from a test case provided by Christoph Jacob.
 ! Contributed by Jerry DeLisle  <jvdelisle@gcc.gnu.org>.
index 3119e808640813891b700e055a8e36c6239a9d27..e877b5beeae09eb5be81e2f65b5fde136dd0d981 100644 (file)
@@ -1,4 +1,6 @@
 !{ dg-do run { target fd_truncate } }
+!{ dg-options "-std=legacy" }
+!
 ! Tests filling arrays from a namelist read when object list is not complete.
 ! This is the same as namelist_21.f90 except using spaces as seperators instead
 ! of commas. Developed from a test case provided by Christoph Jacob.
index 9ff629777104c69a54eaa19d83fc907ce2a8b705..4a46b534f67d3075d40552d700add0db5818af26 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR33039 Read NAMELIST:  reads wrong namelist name
 ! Test case from PR modified by Jerry DeLisle <jvdelisle@gcc.gnu.org>\r
 PROGRAM namelist\r
index 25061c48fc55e04fcc1bc04d7f3dc9f61a87b48f..0133268934067d7876513ac292c4ce740912f9fd 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR37707 Namelist read of array of derived type incorrect.
 type s
    integer m
index 20c7a219cd6b338e87cb22612de06827ccaff4ac..9690d858d07e8a280dfc4ef870d9d0bc51f6f4c3 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR37707 Namelist read of array of derived type incorrect
 ! Test case from PR, prepared by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 TYPE geometry
index 12e72ae7e4da952483b450632102c2cf3e0cf17f..89493a84b343b2103ba24fa53d6abbe54e085e92 100644 (file)
@@ -1,3 +1,6 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! pr24584, segfault on namelist reading an empty string
 ! Contributed by Jerry DeLisle  <jvdelisle@verizon.net> 
       implicit none 
index 0460630dd33229066153702a7bf7e8d49244271e..d550e00aa6d403c6431613dafc1e3d362a18f03a 100644 (file)
@@ -6,7 +6,7 @@
 ! Contributed by Paul Thomas  pault@gcc.gnu.org
 !
 module global
-  character*4 :: aa
+  character(4) :: aa
   integer :: ii
   real    :: rr
   namelist /nml1/ aa, ii, rr
index a9adf015ded7c2f0ba3977c5a8728483c464f769..d9a28a8567b2c8b371fdd79b6fa5ded09d1da4fa 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! This tests the fix for PR22010, where namelists were not being written to
 ! and read back from modules.  It checks that namelists from modules that are
 ! selected by an ONLY declaration work correctly, even when the variables in
index dde171c7ed956c4e21bd57b9267e184500084a06..6be77b36760f24ceadb4a2659bdf67a63f225ba0 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
 !
 ! Test for the fix to PR24409 - the name clash between the module
 ! name and the interface formal argument would cause an ICE.
index 86b43fd7b362c6139899977a0880032ffae6bdb1..2ed68244ede7ec8cfaba16621a118a400eee5d6b 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
 !
 ! Test for supplementary fix to PR24409 - the name clash between the module
 ! variable and the interface formal argument would cause an ICE.
index 8f5faa416297527b7af0b4b38cc44b57f86af3dc..4db31b9e31a2a07e7f186c16f6d2572bc270111b 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 20163, first half:  Trailing blanks on an option to
 !                        open used to cause an error
       CHARACTER*8 ST
index b645e6231a346459ad7021e9c491c934fef90feb..db47b0bfc6231eff3649ca95e473eacae1567e7d 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 21376
 ! we used to take the logarithm of zero in this special case
   character*10 c
index a6e64b4112a240d04f04c153ce46e6d3a4cdbe85..ac631ef08af4bf353948f11fcc954a3ac627e4f4 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Another case of fallout from the original patch for PR14771
 ! Testcase by Erik Zeek
 module para
index 5a888a600568098ec4cf29631517a1a8cfa8a095..6d5ee3b520fb87cf85f28ec4defd767ada6e2e2b 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR fortran/33626
 ! Types were not always propagated correctly
   logical(kind=1) :: i, j
index 2409cb4685f44f25283fa5a718b16c92b22ed870..38a5fdc7b2c693260d30e31f19c84503dc7e02ff 100644 (file)
@@ -16,7 +16,7 @@ contains
   end subroutine sub
 end function f
 
-function g()              ! { dg-warning "is obsolescent in fortran 95" }
+function g()              ! { dg-warning "Obsolescent feature" }
   character(*) :: g
   g = "efgh"
   call sub ()
index b3cb2727007cb894d745578ac904271b0ecd8204..0924117080c684ef8b75dd11f234eea8cd746d87 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR31209, in which an ICE would result because
 ! the reference to the pointer function f would be indirected, as
 ! if it were the result that is being passed.
index f9a277cb7e8cebf1d3f51d2441715649623975db..df3854d7a5f6fdc12b3b0da8dfff4c6c421404cf 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 15129: we used to share the character length between A and B in the 
 ! subroutine.
 CHARACTER*10 A
index 309b59eabf062c277735364776be7ccbe5ff174b..813e3018839be2e2ade8c798bc20bc4c03e2bb7a 100644 (file)
@@ -1,5 +1,7 @@
 ! PR libfortran/15332
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*12 c
 
       write (c,100) 0, 1
index 071bf86d61397e5749d1d5168ebdce7c43dece04..c29147411a810503bc3db3ecd6ff6f9b28324a59 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! pr 16597
 ! libgfortran
 ! reading a direct access record after it was written did
index 1c171a3c902ecf2fb8759281771bb53fb1d373ca..4423eab7354e0e5b02972a3aaa28c0dea80e2f17 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! pr17143
 ! does not print 2*63 correctly
        character*25 l
index a0dfff9aa007d0b740a656800a4733108b039dd4..c9b4d4537d7bd8e5d1cff2e4f750369568512f52 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! pr17164
 ! index aborts when substring is longer than string
       implicit none
index da780d7feef950cb98df90db512f338417cdbfcf..65f72b04d10ed2cd9f3503f51897f8235ed794e9 100644 (file)
@@ -1,22 +1,23 @@
 ! PR fortran/17229
 ! { dg-do run }
+
       integer i
       logical l
 
       l = .false.
       i = -1
-      if (l) if (i) 999,999,999 ! { dg-warning "Obsolescent: arithmetic IF statement" }
+      if (l) if (i) 999,999,999 ! { dg-warning "Obsolescent feature" }
 
       l = .true.
-      if (l) if (i) 10,999,999 ! { dg-warning "Obsolescent: arithmetic IF statement" }
+      if (l) if (i) 10,999,999 ! { dg-warning "Obsolescent feature" }
       go to 999
 
    10 i = 0
-      if (l) if (i) 999,20,999 ! { dg-warning "Obsolescent: arithmetic IF statement" }
+      if (l) if (i) 999,20,999 ! { dg-warning "Obsolescent feature" }
       go to 999
 
    20 i = 1
-      if (l) if (i) 999,999,30 ! { dg-warning "Obsolescent: arithmetic IF statement" }
+      if (l) if (i) 999,999,30 ! { dg-warning "Obsolescent feature" }
       go to 999
 
   999 call abort
index 6095984137899e7868f3040784e5d1b5c17f2dbb..85c5afa3e956525bfd3fba76f5990961a277262e 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Names in upper case and object names starting column 2
 ! Based on example provided by thomas.koenig@online.de
 
index 6387c3f9ce32a722dbff38ecccd0735d58d11261..770b008f9d91b5c12845c9df200d5ffa91914016 100644 (file)
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
 !
 ! PR libfortran/19155
 ! We accept 'E+00' as a valid real number. The standard says it is not,
index e5759da3dc11c6e09e094a68021c8353cebf6375..26b53276dc3d5cfc28faeeee8f0fc13702f6321a 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }     
+! { dg-options "-std=legacy" }
+!
 ! PR 20086 - Missing characters in output with hollerith strings
       implicit none
       character*80 line
index 69f4f18b29c82de14c7d68cc9390156c54a0a220..5d05abf6eb11a95b485b326fcd1c3a63ae224ef2 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! pr 20124
       character*80 line
       x = -.01
index e2bac5a7dccc9f27a9f146f1f2b9a8d0e84a8ef5..4a9b69cad5724041bae9ece450a5059a3364a6d0 100644 (file)
@@ -1,5 +1,7 @@
 ! PR libfortran/20755
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*30 s
       
       write (s,2000) 0.0, 0.02
index 96d0d791cb097b1797ca9ec387560ad9bd09ac90..5c26965ccc56dcb7d61c5d6dd2829dd8b8fd83c4 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR fortran/20865
   subroutine tt(j)
    integer :: j
index c132548c8295d1742affeb6a611f6d3240c877e2..942696c618fa66f16bd82ebb9fc327248df8333d 100644 (file)
@@ -1,6 +1,8 @@
 ! PR libfortran/20950
 ! Original bug-report by Walt Brainerd, The Fortran Company
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*20 c
       inquire (33, sequential = c)
       if (c .ne. "UNKNOWN") call abort
index 9542c02342080aee342af9435e17cfc97639e319..1fe19edfae4d4a34ede8d14af23fb3b7e9a9d052 100644 (file)
@@ -1,5 +1,7 @@
 ! PR fortran/21730
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*2 a
       character*4 b
       character*6 c
index 1cd3557702234db2cb8cd9c324a646b788f66d24..70210f6b095c3730df3ac643ae28595c41b7ae13 100644 (file)
@@ -1,5 +1,7 @@
 ! PR fortran/21730
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
       character*2 a (1)
       character*4 b (1)
       character*6 c
index be4accd6edd718644c5e74dcb353af432ba0c162..e60904395aebc484051f7719606ffbd3687050f5 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
       character*2 a
       character*4 b
       parameter (a="12")
index 26041c7f1d63323551273fc03328cdda96b3ad69..d644483232a82b0d8905174abdc44873b288c3e6 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
       program main
       character*80 line
       print (line,'(A)'), 'hello' ! { dg-error "Syntax error" }
index 699f507dafb7c5a6bb138f925c0c3e141156ca44..520973ed160b0b717f40bdbe849381804fb67bdf 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 program main
   character*80 line
   print (line,'(A)'), 'hello' ! { dg-error "Syntax error" }
index 919089acb425443683c18ce6b67a6a9ae1836886..e85df7635deb9739f13235bb95559b45a3c636aa 100644 (file)
@@ -1,4 +1,6 @@
-! { dg-do compile }\r
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+!\r
 ! This tests the patch for PR26787 in which it was found that setting\r
 ! the result of one module procedure from within another produced an\r
 ! ICE rather than an error.\r
index c7ec4f2f3fc8e376efbefecbd9704da1b3bcda6f..de7cb4159c16502cad5bf11168fccac713a9db76 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! This tests various error messages for PROCEDURE declarations.
 ! Contributed by Janus Weil <jaydub66@gmail.com>
 
index 20e059fca3a8cd28f6d7a1fad4b6be61503471e6..55b8bce24d9e9965d90e7ccde124951aa9655366 100644 (file)
@@ -6,7 +6,7 @@
 ! Contributed by Tobias Burnus <burnus@net-b.de>
 
   procedure(), pointer :: p
-  f(x) = x**2
+  f(x) = x**2  ! { dg-warning "Obsolescent feature" }
   p => f  ! { dg-error "invalid in procedure pointer assignment" }
   p => sub  ! { dg-error "invalid in procedure pointer assignment" }
 contains
index f3327550297791c9167f36de2315ad9afbc50e11..e6c849eab76736d3532ce856e643020865f906de 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR24489 Assure that read does not go past the end of record. The width of
 ! the format specifier is 8, but the internal unit record length is 4 so only
 ! the first 4 characters should be read.
index 86589c053b68cd5c83565cecbbc897d75f52dd62..0848ee67590bee1945367e64f4c6ec3e31e4c3db 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR18218
 ! The IO library has an algorithm that involved repeated multiplication by 10,
 ! resulting in introducing large cumulative floating point errors.
index 1e74c8e1a1bf03b181e3f520e6daf65da2b91072..7b7ba8c3a2524397c06a88e93ae8dcef11ae4cab 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 26554 : Test logical read from string. Test case derived from PR.
 ! Submitted by Jerry DeLisle <jvdelisle@verizon.net>.
 program bug
@@ -13,4 +15,4 @@ program bug
   read (strg,*) l
   if (.not.l) call abort()
   end
-      
\ No newline at end of file
+
index 8f9b09183702cfcd81920d8cfff1560f51e83b6c..bcf51f8d5e99c2d473e32acaa222026a50f2d9be 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! PR20866 - A statement function cannot be recursive.
 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
 !
index a66b4c199ed20c8dddd06dc2ae9942c0442d5b5b..a8067b03c08c5317f4d6eb2a5f0ec8a313930f62 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Test cases where no blank is required after RETURN
 subroutine sub(*)
 return(1)
index cbd2ef17b8fe5095e066f08fbfe3a0050ec7a64e..92edf6dfed9f3750ff89c782e8d8311c547938eb 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Check that rewind doesn't delete a file.
 ! Writing to the file truncates it at the end of the current record.  Out
 ! IO library was defering the actual truncation until the file was rewound.
index 6af85c344efa59816daad1b4e093e391947f3295..cff9eae7ae7fe26efc6bdcce999e32abefe208b6 100644 (file)
@@ -5,7 +5,7 @@
 ! { dg-options "-pedantic" }
 ! { dg-do run }
 !
-     character*5 c
+     character(5) c
      open (42,status='scratch')
      write (42,'(A,$)') 'abc' ! { dg-warning ".*descriptor" "" }
      write (42,'(A)') 'de'
index d7583bc10b446412d8ac55ab3bce122775ea0112..df206458e3a885cd2ed57182e6026e87425b1aa9 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! tests the fix for pr25082 in which the return of an array by a
 ! subroutine went undremarked.
 !
index e21f34e063b1bd725a462a51d6fc08489196b53b..46dde6286b617766827816efefe2e37821757980 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! this is a problem which disappeared between 2005-01-02 and 2005-03-13
 ! PR 18600
       logical a, b
index 42eedf8c830fb4903b4d942950bfffa04877f1c2..90980a924485cd08eec237a5df393359b8df4291 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR20867 in which implicit typing was not done within
 ! statement functions and so was not confirmed or not by subsequent
 ! type delarations.
index e995fb86becfadd8bb35be640ec4d7eadd4394b2..2f0efccf3260ec86bdc68867a863731c1318344f 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR29389, in which the  statement function would not be
 ! recognised as PURE within a PURE procedure.
 
index c5657833c0f6220a86ca31644527dfe4dfc81d05..482d12592f35715cc7d59b3ed6db72d3d1fc93ed 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for the second bit of PR29389, in which the
 ! statement function would not be recognised as not PURE
 ! when it referenced a procedure that is not PURE.
index a7d5d3ccfaa262a1ca06992761dae1f1dee13953..8260a7481c92a06a5095db94ad7e63a71bfeea77 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR25828 Stream IO test 2
 ! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
 PROGRAM readUstream
@@ -16,4 +18,5 @@ PROGRAM readUstream
   if (string.ne."rst") call abort()
   if (n.ne.7) call abort()
   close(unit=11, status="delete")
-END PROGRAM readUstream
\ No newline at end of file
+END PROGRAM readUstream
+
index 3242ea8f9e38667358056344128a965d49050273..7e5c2f9f030418f36480ad9ec6ea229f408e8ac9 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Program to test character array constructors.
 ! PR17144
 subroutine test1 (n, t, u)
index 2e6eb1b2b88feb3ceba042b95f376fda3d7b30e1..659b3eb3709f597209f022413a7d1bf3bbfc9737 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! PR 27784 - Different strings should compare unequal even if they
 !            have CHAR(0) in them.
 
index ee0eae49e0ea42ac0ce2b014207fa361c3acc81a..813a02521a34dbad6fb7c7eb89e932d51d7c92da 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }
+! { dg-options "-std=legacy" }
+!
 ! Check that NULs don't mess up constant substring simplification
 CHARACTER(5), parameter :: c0(1) = (/ "123" // ACHAR(0) // "5" /)
 CHARACTER*5 c(1)
index d2a7ede436f986560706b722a53931611d128bc2..830c7eb71bdc8297fa8e93cde62e9e23497e6505 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do run }     
+! { dg-options "-std=legacy" }
+!
 ! Test of fix to bug triggered by NIST fm908.for.
 ! Left tabbing, followed by X or T-tabbing to the right would
 ! cause spaces to be overwritten on output data.
index 3d35312c92c488c2f2b20fcc8801029e20507898..31765699750431c1af4be3fd1cda7f958a49ada5 100644 (file)
@@ -16,7 +16,7 @@ program main
   integer n
   real r(size)
   integer i
-  character*4 str
+  character(4) str
 
   m(1) = Z'11223344' ! { dg-warning "BOZ literal at .1. outside a DATA statement" }
   m(2) = Z'55667788' ! { dg-warning "BOZ literal at .1. outside a DATA statement" }
index fcbeba5aa51b1fc4b19e22cfd52167aa28a5c13f..0a0883c67c300714dcb1995fadd11445aff6d23a 100644 (file)
@@ -5,7 +5,7 @@
 ! free-form tests
 
 ! gfc_notify_std:
-       function char_ (ch) ! { dg-warning "is obsolescent in fortran 95" }
+       function char_ (ch) ! { dg-warning "Obsolescent feature" }
        character(*) :: char_, ch
         char_ = ch
        end function char_
index de576e2e401cb590f9f383da2096faeb06393495..435e46122277c368f0253ad5702c6c590bc0bd19 100644 (file)
@@ -1,4 +1,6 @@
 c { dg-do run { target fd_truncate } }
+c { dg-options "-std=legacy" }
+c
 c This program tests the fixes to PR22570.
 c
 c Provided by Paul Thomas - pault@gcc.gnu.org