diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-09-22 15:46:41 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-09-22 15:46:41 +0000 |
commit | fdc55763b63d833dccd47781ff5d4b09dd96c1c1 (patch) | |
tree | 67fbb65e9ee062ee2344f0156c199922dd6c94dc /gcc/fortran/arith.c | |
parent | a3b2d4e56c6086a6af1aae2ef3a540171609e153 (diff) | |
download | gcc-fdc55763b63d833dccd47781ff5d4b09dd96c1c1.zip gcc-fdc55763b63d833dccd47781ff5d4b09dd96c1c1.tar.gz gcc-fdc55763b63d833dccd47781ff5d4b09dd96c1c1.tar.bz2 |
re PR fortran/33337 (ICE in gfc_finish_var_decl, at fortran/trans-decl.c:510)
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.
From-SVN: r128672
Diffstat (limited to 'gcc/fortran/arith.c')
-rw-r--r-- | gcc/fortran/arith.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 149f93f..7e3d0a4 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -1793,6 +1793,9 @@ eval_intrinsic_f3 (gfc_intrinsic_op operator, gfc_expr * gfc_parentheses (gfc_expr *op) { + if (gfc_is_constant_expr (op)) + return op; + return eval_intrinsic_f2 (INTRINSIC_PARENTHESES, gfc_arith_identity, op, NULL); } |