Blame SOURCES/gcc7-0000-infrastructure.patch

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