aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2007-09-22 15:46:41 +0000
committerPaul Thomas <pault@gcc.gnu.org>2007-09-22 15:46:41 +0000
commit767121c99ec21951308b996264a611861c69138e (patch)
tree67fbb65e9ee062ee2344f0156c199922dd6c94dc /gcc/fortran/trans-decl.c
parentff07f3abb87fbe2e0d6fe1a05b93647c35a0f53c (diff)
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: https://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.c6
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