diff options
author | Paul Brook <paul@codesourcery.com> | 2004-08-19 21:37:58 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-08-19 21:37:58 +0000 |
commit | bbef13dc2b76a371788b20ba1f0697738e21d9c0 (patch) | |
tree | 36e5a4dfc04bf9584e78226d7c41ae627573cdbb | |
parent | e1d5ee28d3811018ef6ada106626643a36c39530 (diff) | |
download | gcc-bbef13dc2b76a371788b20ba1f0697738e21d9c0.zip gcc-bbef13dc2b76a371788b20ba1f0697738e21d9c0.tar.gz gcc-bbef13dc2b76a371788b20ba1f0697738e21d9c0.tar.bz2 |
re PR fortran/17091 (gfortran MAIN__ symbol not marked TREE_PUBLIC)
PR fortran/17091
* gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
* symbol.c (gfc_clear_attr): Use memset.
From-SVN: r86279
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 2 | ||||
-rw-r--r-- | gcc/fortran/symbol.c | 32 |
3 files changed, 8 insertions, 32 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 29f6721..2ed6de1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2004-08-19 Paul Brook <paul@codesourcery.com> + PR fortran/17091 + * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0. + * symbol.c (gfc_clear_attr): Use memset. + +2004-08-19 Paul Brook <paul@codesourcery.com> + PR fortran/14976 PR fortran/16228 * data.c (assign_substring_data_value): Remove. diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 2839b4a..697f662 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -243,7 +243,7 @@ sym_intent; /* Access types. */ typedef enum -{ ACCESS_PUBLIC = 1, ACCESS_PRIVATE, ACCESS_UNKNOWN +{ ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE, } gfc_access; diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index c125865..7e24d4e 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1010,37 +1010,7 @@ gfc_add_type (gfc_symbol * sym, gfc_typespec * ts, locus * where) void gfc_clear_attr (symbol_attribute * attr) { - - attr->allocatable = 0; - attr->dimension = 0; - attr->external = 0; - attr->intrinsic = 0; - attr->optional = 0; - attr->pointer = 0; - attr->save = 0; - attr->target = 0; - attr->dummy = 0; - attr->result = 0; - attr->entry = 0; - attr->data = 0; - attr->use_assoc = 0; - attr->in_namelist = 0; - - attr->in_common = 0; - attr->function = 0; - attr->subroutine = 0; - attr->generic = 0; - attr->implicit_type = 0; - attr->sequence = 0; - attr->elemental = 0; - attr->pure = 0; - attr->recursive = 0; - - attr->access = ACCESS_UNKNOWN; - attr->intent = INTENT_UNKNOWN; - attr->flavor = FL_UNKNOWN; - attr->proc = PROC_UNKNOWN; - attr->if_source = IFSRC_UNKNOWN; + memset (attr, 0, sizeof(symbol_attribute)); } |