diff options
author | Janus Weil <janus@gcc.gnu.org> | 2018-05-21 08:45:55 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2018-05-21 08:45:55 +0200 |
commit | 67e9518e20b8b836bbaa9dc783bd6a4db56c2bcb (patch) | |
tree | 746807b3f3b84235d9e02e992b13eca29b037db2 /gcc/fortran/match.c | |
parent | f3f7cefecc833b4ab652215ceb8b408c21dca225 (diff) | |
download | gcc-67e9518e20b8b836bbaa9dc783bd6a4db56c2bcb.zip gcc-67e9518e20b8b836bbaa9dc783bd6a4db56c2bcb.tar.gz gcc-67e9518e20b8b836bbaa9dc783bd6a4db56c2bcb.tar.bz2 |
re PR fortran/85841 ([F2018] reject deleted features)
2018-05-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/85841
* libgfortran.h: New macros GFC_STD_OPT_*.
* error.c (notify_std_msg): New function.
(gfc_notify_std): Adjust such that it can handle combinations of
GFC_STD_* flags in the 'std' argument, not just a single one.
* match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
in Fortran 2018.
(gfc_match_stopcode): Use GFC_STD_OPT_* macros.
* options.c (set_default_std_flags): Warn for F2018 deleted features
by default.
(gfc_handle_option): F2018 deleted features are allowed in earlier
standards.
* symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
nonblock do constructs in Fortran 2018.
2018-05-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/85841
* gfortran.dg/g77/19990826-3.f: Add option "-std=legacy".
* gfortran.dg/g77/20020307-1.f: Ditto.
* gfortran.dg/g77/980310-3.f: Ditto.
* gfortran.dg/goacc/loop-1-2.f95: Ditto.
* gfortran.dg/goacc/loop-1.f95: Ditto.
* gfortran.dg/gomp/appendix-a/a.6.1.f90: Ditto.
* gfortran.dg/gomp/appendix-a/a.6.2.f90: Ditto.
* gfortran.dg/gomp/do-1.f90: Ditto.
* gfortran.dg/gomp/omp_do1.f90: Ditto.
* gfortran.dg/pr17229.f: Ditto.
* gfortran.dg/pr37243.f: Ditto.
* gfortran.dg/pr49721-1.f: Ditto.
* gfortran.dg/pr58484.f: Ditto.
* gfortran.dg/pr81175.f: Ditto.
* gfortran.dg/pr81723.f: Ditto.
* gfortran.dg/predcom-2.f: Ditto.
* gfortran.dg/vect/Ofast-pr50414.f90: Ditto.
* gfortran.dg/vect/cost-model-pr34445a.f: Ditto.
* gfortran.dg/vect/fast-math-mgrid-resid.f: Ditto.
* gfortran.dg/vect/pr52580.f: Ditto.
From-SVN: r260433
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 0931edd..6d53d03 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1442,7 +1442,8 @@ match_arithmetic_if (void) return MATCH_ERROR; } - if (!gfc_notify_std (GFC_STD_F95_OBS, "Arithmetic IF statement at %C")) + if (!gfc_notify_std (GFC_STD_F95_OBS | GFC_STD_F2018_DEL, + "Arithmetic IF statement at %C")) return MATCH_ERROR; new_st.op = EXEC_ARITHMETIC_IF; @@ -1522,7 +1523,8 @@ gfc_match_if (gfc_statement *if_type) return MATCH_ERROR; } - if (!gfc_notify_std (GFC_STD_F95_OBS, "Arithmetic IF statement at %C")) + if (!gfc_notify_std (GFC_STD_F95_OBS | GFC_STD_F2018_DEL, + "Arithmetic IF statement at %C")) return MATCH_ERROR; new_st.op = EXEC_ARITHMETIC_IF; @@ -2938,12 +2940,10 @@ gfc_match_stopcode (gfc_statement st) bool f95, f03; /* Set f95 for -std=f95. */ - f95 = gfc_option.allow_std == (GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS); + f95 = (gfc_option.allow_std == GFC_STD_OPT_F95); /* Set f03 for -std=f2003. */ - f03 = gfc_option.allow_std == (GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS | GFC_STD_F2003); + f03 = (gfc_option.allow_std == GFC_STD_OPT_F03); /* Look for a blank between STOP and the stop-code for F2008 or later. */ if (gfc_current_form != FORM_FIXED && !(f95 || f03)) |