diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-10-19 01:28:50 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-10-19 01:28:50 +0000 |
commit | a11930ba8d19cc26848dc06d4a2571642af735b9 (patch) | |
tree | 57b515208fe72f75dd40e6e639f1fde700dcf61a /gcc | |
parent | 21016e43e2ead79d6dec8827a8c66339f467813b (diff) | |
download | gcc-a11930ba8d19cc26848dc06d4a2571642af735b9.zip gcc-a11930ba8d19cc26848dc06d4a2571642af735b9.tar.gz gcc-a11930ba8d19cc26848dc06d4a2571642af735b9.tar.bz2 |
io.h: Remove definition of the BT enumerator.
2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/io.h: Remove definition of the BT enumerator.
* libgfortran.h: Replace GFC_DTYPE enumerator with BT.
* intrinsics/iso_c_generated_procs.c: Likewise
* intrinsics/date_and_time.c: Likewise.
* intrinsics/iso_c_binding.c: Likewise.
* io/list_read.c: Likewise.
* io/transfer.c: Likewise.
* io/write.c: Likewise.
2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.h: Remove definition of bt enumerator.
* libgfortran.h: Add bt enumerator type alighned with defintion.
Remove the dtype enumerator, no longer used.
previously given in libgfortran/io.h
* trans-types.c: Use new bt enumerator.
* trans-io.c: Likewise.
From-SVN: r165675
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 8 | ||||
-rw-r--r-- | gcc/fortran/libgfortran.h | 17 | ||||
-rw-r--r-- | gcc/fortran/trans-io.c | 28 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 12 |
5 files changed, 23 insertions, 52 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b3ff202..43360d8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + * gfortran.h: Remove definition of bt enumerator. + * libgfortran.h: Add bt enumerator type alighned with defintion. + Remove the dtype enumerator, no longer used. + previously given in libgfortran/io.h + * trans-types.c: Use new bt enumerator. + * trans-io.c: Likewise. + 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org> * trans-io.c (gfc_build_io_library_fndecls): @@ -19,6 +28,7 @@ the iocall with the original version, otherwise the version with _WRITE. (transfer_array_desc): Likewise. + 2010-10-15 Tobias Burnus <burnus@net-b.de> PR fortran/45186 diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 8a415f4..33c7ba6 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -139,14 +139,6 @@ typedef enum { FORM_FREE, FORM_FIXED, FORM_UNKNOWN } gfc_source_form; -/* Basic types. BT_VOID is used by ISO C Binding so funcs like c_f_pointer - can take any arg with the pointer attribute as a param. */ -typedef enum -{ BT_UNKNOWN = 1, BT_INTEGER, BT_REAL, BT_COMPLEX, BT_LOGICAL, BT_CHARACTER, - BT_DERIVED, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID -} -bt; - /* Expression node types. */ typedef enum { EXPR_OP = 1, EXPR_FUNCTION, EXPR_CONSTANT, EXPR_VARIABLE, diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h index e26cbf9..85a73d8 100644 --- a/gcc/fortran/libgfortran.h +++ b/gcc/fortran/libgfortran.h @@ -122,16 +122,11 @@ libgfortran_stat_codes; #define GFC_DTYPE_TYPE_MASK 0x38 #define GFC_DTYPE_SIZE_SHIFT 6 +/* Basic types. BT_VOID is used by ISO C Binding so funcs like c_f_pointer + can take any arg with the pointer attribute as a param. These are also + used in the run-time library for IO. */ typedef enum -{ - GFC_DTYPE_UNKNOWN = 0, - GFC_DTYPE_INTEGER, - /* TODO: recognize logical types. */ - GFC_DTYPE_LOGICAL, - GFC_DTYPE_REAL, - GFC_DTYPE_COMPLEX, - GFC_DTYPE_DERIVED, - GFC_DTYPE_CHARACTER +{ BT_UNKNOWN = 0, BT_INTEGER, BT_LOGICAL, BT_REAL, BT_COMPLEX, + BT_DERIVED, BT_CHARACTER, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID } -dtype; - +bt; diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index 6a3428a..2ac3e5c 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -1572,33 +1572,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, } else { - itype = GFC_DTYPE_UNKNOWN; - - switch (ts->type) - - { - case BT_INTEGER: - itype = GFC_DTYPE_INTEGER; - break; - case BT_LOGICAL: - itype = GFC_DTYPE_LOGICAL; - break; - case BT_REAL: - itype = GFC_DTYPE_REAL; - break; - case BT_COMPLEX: - itype = GFC_DTYPE_COMPLEX; - break; - case BT_DERIVED: - itype = GFC_DTYPE_DERIVED; - break; - case BT_CHARACTER: - itype = GFC_DTYPE_CHARACTER; - break; - default: - gcc_unreachable (); - } - + itype = ts->type; dtype = IARG (itype << GFC_DTYPE_TYPE_SHIFT); } diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index ebea9af..1ccba7a 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1319,28 +1319,28 @@ gfc_get_dtype (tree type) switch (TREE_CODE (etype)) { case INTEGER_TYPE: - n = GFC_DTYPE_INTEGER; + n = BT_INTEGER; break; case BOOLEAN_TYPE: - n = GFC_DTYPE_LOGICAL; + n = BT_LOGICAL; break; case REAL_TYPE: - n = GFC_DTYPE_REAL; + n = BT_REAL; break; case COMPLEX_TYPE: - n = GFC_DTYPE_COMPLEX; + n = BT_COMPLEX; break; /* We will never have arrays of arrays. */ case RECORD_TYPE: - n = GFC_DTYPE_DERIVED; + n = BT_DERIVED; break; case ARRAY_TYPE: - n = GFC_DTYPE_CHARACTER; + n = BT_CHARACTER; break; default: |