Blame SOURCES/0006-Allow-blank-format-items-in-format-strings.patch

3db796
From f50b0452c10d514860e08e1ea091b17aa97d6a90 Mon Sep 17 00:00:00 2001
3db796
From: Jim MacArthur <jim.macarthur@codethink.co.uk>
3db796
Date: Thu, 4 Feb 2016 16:59:41 +0000
3db796
Subject: [PATCH 06/23] Allow blank format items in format strings
3db796
3db796
This has to be written in a slightly verbose manner because GCC 7
3db796
defaults to building with -Werror=implicit-fallthrough which prevents
3db796
us from just falling through to the default: case.
3db796
3db796
This feature is enabled by the `-std=extra-legacy` compiler flag.
3db796
---
3db796
        0006-Allow-blank-format-items-in-format-strings.patch
3db796
3db796
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
3db796
index b2fa741..aa3443f 100644
3db796
--- a/gcc/fortran/io.c
3db796
+++ b/gcc/fortran/io.c
3db796
@@ -752,6 +752,16 @@ format_item_1:
3db796
       error = unexpected_end;
3db796
       goto syntax;
3db796
 
3db796
+    case FMT_RPAREN:
3db796
+      /* Oracle allows a blank format item. */
3db796
+      if (gfc_option.allow_std & GFC_STD_EXTRA_LEGACY)
3db796
+        goto finished;
3db796
+      else
3db796
+	{
3db796
+	  error = unexpected_element;
3db796
+	  goto syntax;
3db796
+	}
3db796
+
3db796
     default:
3db796
       error = unexpected_element;
3db796
       goto syntax;