diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-09-20 22:03:22 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-09-20 22:03:22 +0000 |
commit | 9fa6b0af1f0a8ec3d6799f54a7c8feedbbc0d4f9 (patch) | |
tree | c777e12a86d2297992869f6434a715f22b9b1da3 /gcc/fortran/symbol.c | |
parent | 4f68f111df59d8474f3635bb7a3eb5e0469b722b (diff) | |
download | gcc-9fa6b0af1f0a8ec3d6799f54a7c8feedbbc0d4f9.zip gcc-9fa6b0af1f0a8ec3d6799f54a7c8feedbbc0d4f9.tar.gz gcc-9fa6b0af1f0a8ec3d6799f54a7c8feedbbc0d4f9.tar.bz2 |
re PR fortran/33221 (Cannot declare variables of TYPE without components)
PR fortran/33221
* gfortran.h (symbol_attribute): Add zero_comp field.
* symbol.c (gfc_use_derived): Handle case of emtpy derived types.
* decl.c (gfc_match_data_decl): Likewise.
(gfc_match_derived_decl): Likewise.
* module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
(mio_symbol_attribute): Write and read AB_ZERO_COMP.
* resolve.c (resolve_symbol): Handle case of emtpy derived types.
* parse.c (parse_derived): Likewise.
* gfortran.dg/used_types_18.f90: Declare variable of empty
derived type.
From-SVN: r128633
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 6ed366f..d6bd963 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1703,7 +1703,7 @@ gfc_use_derived (gfc_symbol *sym) gfc_symtree *st; int i; - if (sym->components != NULL) + if (sym->components != NULL || sym->attr.zero_comp) return sym; /* Already defined. */ if (sym->ns->parent == NULL) |