Bug 40881 - [F03] warn for obsolescent features
Summary: [F03] warn for obsolescent features
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: F2003
  Show dependency treegraph
 
Reported: 2009-07-27 19:50 UTC by janus
Modified: 2018-05-18 20:21 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-08-01 14:24:32


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description janus 2009-07-27 19:50:41 UTC
gfortran should have a flag ("-Wobsolescent" or similar) to turn on warnings about obsolescent features. These features are listed in chapter B.2 in the Fortran standard. They are not forbidden by the standard, but are redundant and can be replaced by newer and better features.

The standard also notes the possibility that they may be removed in the future. Therefore gfortran should discourage their usage, just like the standard does.

Obsolescent features in Fortran 2003 are:

   (1) Arithmetic IF
   (2) Shared DO termination and termination
       on a statement other than END DO or CONTINUE
   (3) Alternate return
   (4) Computed GO TO statement
   (5) Statement functions
   (6) DATA statements amongst executable statements
   (7) Assumed length character functions
   (8) Fixed form source
   (9) CHARACTER* form of CHARACTER declaration


The -Wobsolescent flag does not have to go into -Wall (maybe -Wextra?)
Comment 1 Tobias Burnus 2009-07-28 08:33:28 UTC
In a similar vain: One could introduct an option to disable warning for the deleted features (such as using real-valued loops) - currently, those warnings alre always printed, hiding other warnings in all the output.

By the way, in the standard, obsolescent parts appear in smaller print.

Comment 2 janus 2009-07-29 11:41:32 UTC
(In reply to comment #1)
> In a similar vain: One could introduct an option to disable warning for the
> deleted features

Good point. In particular these are:

 (1) Real and double precision DO variables.
 (2) Branching to an END IF statement from outside its block.
 (3) PAUSE statement.
 (4) ASSIGN and assigned GO TO statements and assigned format specifiers.
 (5) H edit descriptor.
Comment 3 janus 2009-07-30 08:20:41 UTC
In principle warnings for obsolescent features are already there (cf. GFC_STD_F95_OBS). They are issued with -std=f95 or above, which does work e.g. for arithmetic if. However, there is no warning for alternate return (maybe others are missing as well).

The warnings about deleted features can be turned off via -std=legacy, and are turned into errors by -std=f95 and above.
Comment 4 janus 2009-08-02 10:59:04 UTC
Subject: Bug 40881

Author: janus
Date: Sun Aug  2 10:58:44 2009
New Revision: 150349

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150349
Log:
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.



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

Comment 5 janus 2009-08-02 11:13:30 UTC
r150349 adds warnings for:

* alternate return
* computed goto
* statement functions
* old-style character lengths


Before we already had:

* arithmetic if
* assumed-length character functions


Which leaves the following warnings unimplemented:

* shared DO termination
* DATA statements among executable statements
* fixed form source
Comment 6 Tobias Burnus 2009-08-03 07:04:21 UTC
(In reply to comment #3)
> The warnings about deleted features can be turned off via -std=legacy, and are
> turned into errors by -std=f95 and above.

I think I would like to see a way to disable them with -std=gnu. Sometimes one wants to have as many warnings as possible, except for one class of warnings, which appears often in legacy programs. Thus -W(no-)deleted-std or something like that (on for -std=gnu, off for -std=legacy) would be sometimes useful, if one wants to get an old program running.
Comment 7 Daniel Franke 2010-05-07 19:46:40 UTC
(In reply to comment #5)
> * shared DO termination

Ahh, I'd like to see that one!


(In reply to comment #6)
That's your PR40165 ;)
Comment 8 Tobias Burnus 2012-08-14 10:26:16 UTC
Author: burnus
Date: Tue Aug 14 10:26:11 2012
New Revision: 190379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190379
Log:
2012-08-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40881
        * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
        when the error/warning has been printed.
        * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
        * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
        * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
        (parse_executable): Add obsolescence check for DATA.
        * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
        * symbol.c (gfc_define_st_label, gfc_reference_st_label):
        Add obsolescence diagnostics.
        * trans-stmt.c (gfc_trans_label_assign): Handle
        * ST_LABEL_DO_TARGET.

2012-08-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40881
        * gfortran.dg/data_constraints_3.f90: New.
        * gfortran.dg/data_constraints_1.f90: Add dg-options ""
        to disable -pedantic compilation.
        * gfortran.dg/pr37243.f: Ditto.
        * gfortran.dg/g77/19990826-3.f: Ditto.
        * gfortran.dg/g77/20020307-1.f : Ditto.
        * gfortran.dg/g77/980310-3.f: Ditto.


Added:
    trunk/gcc/testsuite/gfortran.dg/data_constraints_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/error.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/data_constraints_1.f90
    trunk/gcc/testsuite/gfortran.dg/g77/19990826-3.f
    trunk/gcc/testsuite/gfortran.dg/g77/20020307-1.f
    trunk/gcc/testsuite/gfortran.dg/g77/980310-3.f
    trunk/gcc/testsuite/gfortran.dg/pr37243.f
Comment 9 Tobias Burnus 2012-08-14 10:30:26 UTC
(In reply to comment #0)
>    (2) Shared DO termination and termination
>        on a statement other than END DO or CONTINUE
>    (6) DATA statements amongst executable statements

Those two are now fixed.

I think the only missing item is the following:

>    (8) Fixed form source

(I think one should consider to add some flag to silence the fixed-form warning. At least I know a lot of code, which is in fixed form but otherwise warning free.)
Comment 10 janus 2013-04-03 07:53:11 UTC
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=197389


2013-04-03  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/56284
    PR fortran/40881
    * decl.c (gfc_match_formal_arglist): Warn about alternate-return
    arguments.
    * interface.c (check_dummy_characteristics): Return if symbols are NULL.

2013-04-03  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/56284
    PR fortran/40881
    * gfortran.dg/altreturn_8.f90: New.
    * gfortran.dg/altreturn_2.f90: Add -std=legacy.
    * gfortran.dg/intrinsic_actual_3.f90: Ditto.
    * gfortran.dg/invalid_interface_assignment.f90: Ditto.



(This adds additional warnings about alternate-return cases that were not caught previously.)
Comment 11 janus 2013-04-04 19:23:26 UTC
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=197495


2013-04-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40881
	* match.c (gfc_match_return): Remove standard notification.
	* primary.c (gfc_match_actual_arglist): Add standard notification.


2013-04-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40881
	* gfortran.dg/altreturn_1.f90: Add -std=gnu.
	* gfortran.dg/altreturn_4.f90: Ditto.
	* gfortran.dg/altreturn_3.f90: Replace -std=legacy by -std=gnu.
	* gfortran.dg/altreturn_5.f90: Ditto.
	* gfortran.dg/altreturn_6.f90: Ditto.
	* gfortran.dg/altreturn_7.f90: Ditto.
Comment 12 janus 2013-04-04 19:28:48 UTC
(In reply to comment #9)
> I think the only missing item is the following:
> 
> >    (8) Fixed form source
> 
> (I think one should consider to add some flag to silence the fixed-form
> warning. At least I know a lot of code, which is in fixed form but otherwise
> warning free.)

I'm not really sure if it makes sense to add a warning for fixed source, but I'm leaving this PR open, in case someone will consider it in the future.

For now, I certainly do not plan to work on it, therefore I'll unassign myself.
Comment 13 Dominique d'Humieres 2015-09-08 09:41:14 UTC
> I'm not really sure if it makes sense to add a warning for fixed source,
> but I'm leaving this PR open, in case someone will consider it in the future.

IMO it does not make sense to warn for fixed form. Any objection to close this PR as FIXED?
Comment 14 Dominique d'Humieres 2015-10-10 09:10:16 UTC
> IMO it does not make sense to warn for fixed form. Any objection to close
> this PR as FIXED?

No feedback, closing as FIXED.