aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2016-09-22 11:26:59 +0000
committerPaul Thomas <pault@gcc.gnu.org>2016-09-22 11:26:59 +0000
commit195d1431ff5b9903938f2ee1a6ed86df0cf9b115 (patch)
tree9b6f3986ccf569bca23281d89cc0f9230f8ef158 /gcc
parentcf352092e2ec219b0c841cb6e49d876a4b312bca (diff)
downloadgcc-195d1431ff5b9903938f2ee1a6ed86df0cf9b115.zip
gcc-195d1431ff5b9903938f2ee1a6ed86df0cf9b115.tar.gz
gcc-195d1431ff5b9903938f2ee1a6ed86df0cf9b115.tar.bz2
re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO))
2016-09-22 Paul Thomas <pault@gcc.gnu.org> PR fortran/48298 * gfortran.h : Place the pseudo operators INTRINSIC_FORMATTED and INTRINSIC_UNFORMATTED after the sentinel in enum gfc_intrinsic_op so that they do not appear as place holders in module_write. * interface.c (dtio_op): Comment on the special nature of the pseudo operators INTRINSIC FORMATTED and INTRINSIC_UNFORMATTED. From-SVN: r240349
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/gfortran.h7
-rw-r--r--gcc/fortran/interface.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index c3fb6ed..912f5fb 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -178,9 +178,10 @@ enum gfc_intrinsic_op
INTRINSIC_EQ_OS, INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
INTRINSIC_LT_OS, INTRINSIC_LE_OS,
INTRINSIC_NOT, INTRINSIC_USER, INTRINSIC_ASSIGN, INTRINSIC_PARENTHESES,
- /* User defined derived type pseudo operator. */
- INTRINSIC_FORMATTED, INTRINSIC_UNFORMATTED,
- GFC_INTRINSIC_END /* Sentinel */
+ GFC_INTRINSIC_END, /* Sentinel */
+ /* User defined derived type pseudo operators. These are set beyond the
+ sentinel so that they are excluded from module_read and module_write. */
+ INTRINSIC_FORMATTED, INTRINSIC_UNFORMATTED
};
/* This macro is the number of intrinsic operators that exist.
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 09f5a53..9a19fa7 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -115,7 +115,9 @@ fold_unary_intrinsic (gfc_intrinsic_op op)
}
-/* Return the operator depending on the DTIO moded string. */
+/* Return the operator depending on the DTIO moded string. Note that
+ these are not operators in the normal sense and so have been placed
+ beyond GFC_INTRINSIC_END in gfortran.h:enum gfc_intrinsic_op. */
static gfc_intrinsic_op
dtio_op (char* mode)