diff options
author | Andrew Pinski <pinskia@gmail.com> | 2006-11-25 20:42:00 -0800 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-11-25 20:42:00 -0800 |
commit | fade9a8e43b096aa4462ce63a556c03429cb7398 (patch) | |
tree | 04190ba49beaf590b27481bfed533198e333657a /gcc/fortran | |
parent | 54dc22f4450b1a3d0dc2427f5038daa11b334fa5 (diff) | |
download | gcc-fade9a8e43b096aa4462ce63a556c03429cb7398.zip gcc-fade9a8e43b096aa4462ce63a556c03429cb7398.tar.gz gcc-fade9a8e43b096aa4462ce63a556c03429cb7398.tar.bz2 |
re PR fortran/29982 ([4.1 only] ICE in write() with gfortran 4.1.2 (and 4.2 and 4.3...))
2006-11-25 Andrew Pinski <pinskia@gmail.com>
PR fortran/29982
* trans-expr.c (gfc_conv_expr_reference): Strip off NOP_EXPRs.
2006-11-25 Andrew Pinski <pinskia@gmail.com>
PR fortran/29982
* gfortran.fortran-torture/compile/parameter_3.f90: New
testcase.
From-SVN: r119218
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-expr.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index cf78797..a6a2962 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,10 @@ 2006-11-25 Andrew Pinski <pinskia@gmail.com> + PR fortran/29982 + * trans-expr.c (gfc_conv_expr_reference): Strip off NOP_EXPRs. + +2006-11-25 Andrew Pinski <pinskia@gmail.com> + PR fortran/29951 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Change to call memcpy instead of creating a VIEW_CONVERT_EXRP. diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 984c6d3..8e1dcc13f 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -3133,8 +3133,10 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr) /* Create a temporary var to hold the value. */ if (TREE_CONSTANT (se->expr)) { - var = build_decl (CONST_DECL, NULL, TREE_TYPE (se->expr)); - DECL_INITIAL (var) = se->expr; + tree tmp = se->expr; + STRIP_TYPE_NOPS (tmp); + var = build_decl (CONST_DECL, NULL, TREE_TYPE (tmp)); + DECL_INITIAL (var) = tmp; TREE_STATIC (var) = 1; pushdecl (var); } |