aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2007-07-06 08:37:22 -0400
committerDaniel Franke <dfranke@gcc.gnu.org>2007-07-06 08:37:22 -0400
commitef7236d25b52738a4de814b587cab39bf8babb08 (patch)
treee23e329b9cee8d78d66c5fb40698f15edf6dcf2b /gcc/fortran/module.c
parent004e2fa73b7677e460c760878469d7a6c3759ea4 (diff)
downloadgcc-ef7236d25b52738a4de814b587cab39bf8babb08.zip
gcc-ef7236d25b52738a4de814b587cab39bf8babb08.tar.gz
gcc-ef7236d25b52738a4de814b587cab39bf8babb08.tar.bz2
re PR fortran/32633 (bogus error)
gcc/fortran: 2007-05-06 Daniel Franke <franke.daniel@gmail.com> PR fortran/32633 * symbol.c (save_status): New. * gfortran.h (save_status): Added external declaration. (check_conflict): Check for conflicting explicite SAVE statements only. (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant. * module.c (ab_attribute, attr_bits): Removed enumerator value AB_SAVE for save attribute. (mio_symbol_attribute): Import/export the full SAVE status, removed usage of AB_SAVE. * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status. * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not already explicit. gcc/testsuite: 2007-07-06 Daniel Franke <franke.daniel@gmail.com> * gfortran.dg/save_parameter.f90: New test. * gfortran.dg/module_md5_1.f90: Updated MD5 sum. From-SVN: r126413
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 665f6a1..94e6392 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1512,7 +1512,7 @@ mio_internal_string (char *string)
typedef enum
{ AB_ALLOCATABLE, AB_DIMENSION, AB_EXTERNAL, AB_INTRINSIC, AB_OPTIONAL,
- AB_POINTER, AB_SAVE, AB_TARGET, AB_DUMMY, AB_RESULT, AB_DATA,
+ AB_POINTER, AB_TARGET, AB_DUMMY, AB_RESULT, AB_DATA,
AB_IN_NAMELIST, AB_IN_COMMON, AB_FUNCTION, AB_SUBROUTINE, AB_SEQUENCE,
AB_ELEMENTAL, AB_PURE, AB_RECURSIVE, AB_GENERIC, AB_ALWAYS_EXPLICIT,
AB_CRAY_POINTER, AB_CRAY_POINTEE, AB_THREADPRIVATE, AB_ALLOC_COMP,
@@ -1529,7 +1529,6 @@ static const mstring attr_bits[] =
minit ("INTRINSIC", AB_INTRINSIC),
minit ("OPTIONAL", AB_OPTIONAL),
minit ("POINTER", AB_POINTER),
- minit ("SAVE", AB_SAVE),
minit ("VOLATILE", AB_VOLATILE),
minit ("TARGET", AB_TARGET),
minit ("THREADPRIVATE", AB_THREADPRIVATE),
@@ -1567,6 +1566,7 @@ DECL_MIO_NAME (expr_t)
DECL_MIO_NAME (gfc_access)
DECL_MIO_NAME (gfc_intrinsic_op)
DECL_MIO_NAME (ifsrc)
+DECL_MIO_NAME (save_state)
DECL_MIO_NAME (procedure_type)
DECL_MIO_NAME (ref_type)
DECL_MIO_NAME (sym_flavor)
@@ -1590,6 +1590,7 @@ mio_symbol_attribute (symbol_attribute *attr)
attr->intent = MIO_NAME (sym_intent) (attr->intent, intents);
attr->proc = MIO_NAME (procedure_type) (attr->proc, procedures);
attr->if_source = MIO_NAME (ifsrc) (attr->if_source, ifsrc_types);
+ attr->save = MIO_NAME (save_state) (attr->save, save_status);
if (iomode == IO_OUTPUT)
{
@@ -1607,8 +1608,6 @@ mio_symbol_attribute (symbol_attribute *attr)
MIO_NAME (ab_attribute) (AB_POINTER, attr_bits);
if (attr->protected)
MIO_NAME (ab_attribute) (AB_PROTECTED, attr_bits);
- if (attr->save)
- MIO_NAME (ab_attribute) (AB_SAVE, attr_bits);
if (attr->value)
MIO_NAME (ab_attribute) (AB_VALUE, attr_bits);
if (attr->volatile_)
@@ -1696,9 +1695,6 @@ mio_symbol_attribute (symbol_attribute *attr)
case AB_PROTECTED:
attr->protected = 1;
break;
- case AB_SAVE:
- attr->save = 1;
- break;
case AB_VALUE:
attr->value = 1;
break;