Blame SOURCES/gcc7-0000-infrastructure.patch

c80ea0
commit 366dbfaa2132186e5e8b0688df05662967e628c7
c80ea0
Author: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
c80ea0
Date:   Wed Mar 28 11:59:06 2018 +0000
c80ea0
c80ea0
            * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
c80ea0
            * ioparm.def (IOPARM_dt_default_exp): Rename to ...
c80ea0
            (IOPARM_dt_dec_ext): ... this.
c80ea0
            * trans-io.c (build_dt): Adjust for default_exp renaming to
c80ea0
            dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
c80ea0
            * io.c (match_io): Likewise.
c80ea0
    
c80ea0
            * io/io.h (IOPARM_DT_DEFAULT_EXP): Rename to ...
c80ea0
            (IOPARM_DT_DEC_EXT): ... this.
c80ea0
            * io/list_read.c (parse_real): Adjust for IOPARM_DT_DEFAULT_EXP
c80ea0
            renaming to IOPARM_DT_DEC_EXT.
c80ea0
            (read_real): Likewise.
c80ea0
            * io/read.c (read_f): Likewise.
c80ea0
    
c80ea0
    
c80ea0
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258920 138bc75d-0d04-0410-961f-82ee72b054a4
c80ea0
c80ea0
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
c80ea0
index 2bfd1e3019d..507570ccbff 100644
c80ea0
--- a/gcc/fortran/gfortran.h
c80ea0
+++ b/gcc/fortran/gfortran.h
c80ea0
@@ -2437,7 +2437,7 @@ typedef struct
c80ea0
   gfc_expr *io_unit, *format_expr, *rec, *advance, *iostat, *size, *iomsg,
c80ea0
 	   *id, *pos, *asynchronous, *blank, *decimal, *delim, *pad, *round,
c80ea0
 	   *sign, *extra_comma, *dt_io_kind, *udtio;
c80ea0
-  char default_exp;
c80ea0
+  char dec_ext;
c80ea0
 
c80ea0
   gfc_symbol *namelist;
c80ea0
   /* A format_label of `format_asterisk' indicates the "*" format */
c80ea0
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
c80ea0
index 10b7e827dab..0aa31bb6a4f 100644
c80ea0
--- a/gcc/fortran/io.c
c80ea0
+++ b/gcc/fortran/io.c
c80ea0
@@ -4291,9 +4291,10 @@ get_io_list:
c80ea0
 	goto syntax;
c80ea0
     }
c80ea0
 
c80ea0
-  /* See if we want to use defaults for missing exponents in real transfers.  */
c80ea0
+  /* See if we want to use defaults for missing exponents in real transfers
c80ea0
+     and other DEC runtime extensions.  */
c80ea0
   if (flag_dec)
c80ea0
-    dt->default_exp = 1;
c80ea0
+    dt->dec_ext = 1;
c80ea0
 
c80ea0
   /* A full IO statement has been matched.  Check the constraints.  spec_end is
c80ea0
      supplied for cases where no locus is supplied.  */
c80ea0
diff --git a/gcc/fortran/ioparm.def b/gcc/fortran/ioparm.def
c80ea0
index b9dc58f26a7..9ab3b58946e 100644
c80ea0
--- a/gcc/fortran/ioparm.def
c80ea0
+++ b/gcc/fortran/ioparm.def
c80ea0
@@ -118,5 +118,5 @@ IOPARM (dt,      round,		1 << 23, char2)
c80ea0
 IOPARM (dt,      sign,		1 << 24, char1)
c80ea0
 #define IOPARM_dt_f2003		      (1 << 25)
c80ea0
 #define IOPARM_dt_dtio		      (1 << 26)
c80ea0
-#define IOPARM_dt_default_exp	      (1 << 27)
c80ea0
+#define IOPARM_dt_dec_ext	      (1 << 27)
c80ea0
 IOPARM (dt,      u,		0,	 pad)
c80ea0
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
c80ea0
index 9058712c695..2626c4651e2 100644
c80ea0
--- a/gcc/fortran/trans-io.c
c80ea0
+++ b/gcc/fortran/trans-io.c
c80ea0
@@ -1958,8 +1958,8 @@ build_dt (tree function, gfc_code * code)
c80ea0
       if (dt->udtio)
c80ea0
 	mask |= IOPARM_dt_dtio;
c80ea0
 
c80ea0
-      if (dt->default_exp)
c80ea0
-	mask |= IOPARM_dt_default_exp;
c80ea0
+      if (dt->dec_ext)
c80ea0
+	mask |= IOPARM_dt_dec_ext;
c80ea0
 
c80ea0
       if (dt->namelist)
c80ea0
 	{
c80ea0
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
c80ea0
index 3c2a2cae38a..ccbaf47ff90 100644
c80ea0
--- a/libgfortran/io/io.h
c80ea0
+++ b/libgfortran/io/io.h
c80ea0
@@ -442,7 +442,7 @@ st_parameter_inquire;
c80ea0
 #define IOPARM_DT_HAS_SIGN			(1 << 24)
c80ea0
 #define IOPARM_DT_HAS_F2003                     (1 << 25)
c80ea0
 #define IOPARM_DT_HAS_UDTIO                     (1 << 26)
c80ea0
-#define IOPARM_DT_DEFAULT_EXP			(1 << 27)
c80ea0
+#define IOPARM_DT_DEC_EXT			(1 << 27)
c80ea0
 /* Internal use bit.  */
c80ea0
 #define IOPARM_DT_IONML_SET			(1u << 31)
c80ea0
 
c80ea0
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
c80ea0
index d052d1fa828..300c3bd23f3 100644
c80ea0
--- a/libgfortran/io/list_read.c
c80ea0
+++ b/libgfortran/io/list_read.c
c80ea0
@@ -1380,7 +1380,7 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length)
c80ea0
   if (!isdigit (c))
c80ea0
     {
c80ea0
       /* Extension: allow default exponent of 0 when omitted.  */
c80ea0
-      if (dtp->common.flags & IOPARM_DT_DEFAULT_EXP)
c80ea0
+      if (dtp->common.flags & IOPARM_DT_DEC_EXT)
c80ea0
 	{
c80ea0
 	  push_char (dtp, '0');
c80ea0
 	  goto done;
c80ea0
@@ -1831,7 +1831,7 @@ read_real (st_parameter_dt *dtp, void *dest, int length)
c80ea0
   if (!isdigit (c))
c80ea0
     {
c80ea0
       /* Extension: allow default exponent of 0 when omitted.  */
c80ea0
-      if (dtp->common.flags & IOPARM_DT_DEFAULT_EXP)
c80ea0
+      if (dtp->common.flags & IOPARM_DT_DEC_EXT)
c80ea0
 	{
c80ea0
 	  push_char (dtp, '0');
c80ea0
 	  goto done;
c80ea0
diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c
c80ea0
index 87adfb8a41d..976020af448 100644
c80ea0
--- a/libgfortran/io/read.c
c80ea0
+++ b/libgfortran/io/read.c
c80ea0
@@ -1093,7 +1093,7 @@ exponent:
c80ea0
   if (w == 0)
c80ea0
     {
c80ea0
       /* Extension: allow default exponent of 0 when omitted.  */
c80ea0
-      if (dtp->common.flags & IOPARM_DT_DEFAULT_EXP)
c80ea0
+      if (dtp->common.flags & IOPARM_DT_DEC_EXT)
c80ea0
 	goto done;
c80ea0
       else
c80ea0
 	goto bad_float;