Blame SOURCES/0003-Add-std-extra-legacy.patch

840d93
From d1bb76287ec58fdde7ced70088559136555bd7bd Mon Sep 17 00:00:00 2001
840d93
From: Jim MacArthur <jim.macarthur@codethink.co.uk>
840d93
Date: Fri, 11 Dec 2015 17:04:09 +0000
840d93
Subject: [PATCH 03/23] Add -std=extra-legacy
840d93
840d93
840d93
        0003-Add-std-extra-legacy.patch
840d93
    
840d93
        0023-Add-a-full-stop-to-the-std-extra-legacy-help-text.patch
840d93
840d93
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
840d93
index 4421ce4..4808c27 100644
840d93
--- a/gcc/fortran/lang.opt
840d93
+++ b/gcc/fortran/lang.opt
840d93
@@ -790,6 +790,10 @@ std=legacy
840d93
 Fortran
840d93
 Accept extensions to support legacy code.
840d93
 
840d93
+std=extra-legacy
840d93
+Fortran
840d93
+Accept even more legacy extensions, including things disallowed in f90.
840d93
+
840d93
 undef
840d93
 Fortran
840d93
 ; Documented in C
840d93
diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h
840d93
index c5ff992..dcc923b 100644
840d93
--- a/gcc/fortran/libgfortran.h
840d93
+++ b/gcc/fortran/libgfortran.h
840d93
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3.
840d93
    Note that no features were obsoleted nor deleted in F2003.
840d93
    Please remember to keep those definitions in sync with
840d93
    gfortran.texi.  */
840d93
+#define GFC_STD_EXTRA_LEGACY	(1<<13)	/* Even more backward compatibility.  */
840d93
 #define GFC_STD_F2018_DEL      (1<<12)  /* Deleted in F2018.  */
840d93
 #define GFC_STD_F2018_OBS      (1<<11)  /* Obsolescent in F2018.  */
840d93
 #define GFC_STD_F2018          (1<<10)  /* New in F2018.  */
840d93
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
840d93
index 1af76aa..9ebf8e3 100644
840d93
--- a/gcc/fortran/options.c
840d93
+++ b/gcc/fortran/options.c
840d93
@@ -733,6 +733,12 @@ gfc_handle_option (size_t scode, const char *arg, int value,
840d93
       gfc_option.warn_std = 0;
840d93
       break;
840d93
 
840d93
+    case OPT_std_extra_legacy:
840d93
+      set_default_std_flags ();
840d93
+      gfc_option.warn_std = 0;
840d93
+      gfc_option.allow_std |= GFC_STD_EXTRA_LEGACY;
840d93
+      break;
840d93
+
840d93
     case OPT_fshort_enums:
840d93
       /* Handled in language-independent code.  */
840d93
       break;