diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 15:46:41 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 15:46:41 +0000 |
commit | be0f1581f250c18ae6e30def1433717e5595a2e2 (patch) | |
tree | 67fbb65e9ee062ee2344f0156c199922dd6c94dc /gcc/fortran/trans-decl.c | |
parent | 4cac39455215a243e113a3dee1e9412dd1f86b23 (diff) | |
download | gcc-be0f1581f250c18ae6e30def1433717e5595a2e2.tar.gz |
2007-09-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33337
PR fortran/33376
* trans-decl.c (gfc_create_module_variable): Output
derived type parameters.
* arith.c (gfc_parentheses): Return the argument if
it is a constant expression.
* primary.c (gfc_match_rvalue): Remove the clearing of
the module name and the use_assoc attribute for derived
type parameter expressions.
2007-09-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33337
* gfortran.dg/derived_comp_array_ref_3.f90: New test.
PR fortran/33376
* gfortran.dg/derived_comp_array_ref_4.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 854ca54af02..e27a04bd4c7 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2764,9 +2764,11 @@ gfc_create_module_variable (gfc_symbol * sym) && sym->ts.type == BT_DERIVED) sym->backend_decl = gfc_typenode_for_spec (&(sym->ts)); - /* Only output variables and array valued parameters. */ + /* Only output variables and array valued, or derived type, + parameters. */ if (sym->attr.flavor != FL_VARIABLE - && (sym->attr.flavor != FL_PARAMETER || sym->attr.dimension == 0)) + && !(sym->attr.flavor == FL_PARAMETER + && (sym->attr.dimension || sym->ts.type == BT_DERIVED))) return; /* Don't generate variables from other modules. Variables from |