aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2018-05-21 08:45:55 +0200
committerJanus Weil <janus@gcc.gnu.org>2018-05-21 08:45:55 +0200
commit67e9518e20b8b836bbaa9dc783bd6a4db56c2bcb (patch)
tree746807b3f3b84235d9e02e992b13eca29b037db2 /gcc/fortran/options.c
parentf3f7cefecc833b4ab652215ceb8b408c21dca225 (diff)
downloadgcc-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/options.c')
-rw-r--r--gcc/fortran/options.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 3c17a58..6f45a8e 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -44,7 +44,7 @@ set_default_std_flags (void)
| GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F95 | GFC_STD_F77
| GFC_STD_F2008_OBS | GFC_STD_F2008_TS | GFC_STD_GNU | GFC_STD_LEGACY
| GFC_STD_F2018 | GFC_STD_F2018_DEL | GFC_STD_F2018_OBS;
- gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY;
+ gfc_option.warn_std = GFC_STD_F2018_DEL | GFC_STD_F95_DEL | GFC_STD_LEGACY;
}
@@ -705,8 +705,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_std_f95:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77
- | GFC_STD_F2008_OBS;
+ gfc_option.allow_std = GFC_STD_OPT_F95;
gfc_option.warn_std = GFC_STD_F95_OBS;
gfc_option.max_continue_fixed = 19;
gfc_option.max_continue_free = 39;
@@ -716,8 +715,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_std_f2003:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
- | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS;
+ gfc_option.allow_std = GFC_STD_OPT_F03;
gfc_option.warn_std = GFC_STD_F95_OBS;
gfc_option.max_identifier_length = 63;
warn_ampersand = 1;
@@ -725,8 +723,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_std_f2008:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
- | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS;
+ gfc_option.allow_std = GFC_STD_OPT_F08;
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS;
gfc_option.max_identifier_length = 63;
warn_ampersand = 1;
@@ -734,9 +731,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_std_f2008ts:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
- | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS
- | GFC_STD_F2008_TS;
+ gfc_option.allow_std = GFC_STD_OPT_F08TS;
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS;
gfc_option.max_identifier_length = 63;
warn_ampersand = 1;
@@ -744,9 +739,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_std_f2018:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
- | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS
- | GFC_STD_F2008_TS | GFC_STD_F2018 | GFC_STD_F2018_OBS;
+ gfc_option.allow_std = GFC_STD_OPT_F18;
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS
| GFC_STD_F2018_OBS;
gfc_option.max_identifier_length = 63;