[Patch, Fortran] PR 85849: [F2018] warn for obsolescent features

Janus Weil janus@gcc.gnu.org
Thu May 24 19:57:00 GMT 2018


Hi all,

just because 2018 seems like a good time to do that, I continue
plucking some of the low-hanging Fortran 2018 fruit. The attached
patch adds obsolescence warnings for all major F18 obsolescences
(COMMON, BLOCK DATA, EQUIVALENCE, FORALL, labeled DO). Those warnings
appear only with -std=f2018, but not with gfortran's default -std=gnu.
They currently have zero impact on the gfortran test suite, so I'm
adding a new test case to check for their existence.

Regtests cleanly on x86_64-linux-gnu. Ok for trunk?

Cheers,
Janus


2018-05-24  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/85839
    * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
    an obsolescent feature in Fortran 2018.
    (gfc_match_equivalence): Ditto.
    * resolve.c (resolve_common_blocks): Ditto.
    (gfc_resolve_forall): Ditto.
    * symbol.c (gfc_define_st_label): Ditto.


2018-05-24  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/85839
    * gfortran.dg/f2018_obs.f90: New test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr85839.diff
Type: text/x-patch
Size: 2086 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180524/2576adaf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f2018_obs.f90
Type: text/x-fortran
Size: 799 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180524/2576adaf/attachment-0001.bin>


More information about the Fortran mailing list