diff options
| author | Paul Thomas <pault@gcc.gnu.org> | 2006-11-05 06:27:48 +0000 |
|---|---|---|
| committer | Paul Thomas <pault@gcc.gnu.org> | 2006-11-05 06:27:48 +0000 |
| commit | 58b6e04789a04563418234e753835ee6248bf4d8 (patch) | |
| tree | d03b8048cc4743b2d76e030ab691c2db5c79c4b6 /gcc/fortran/trans-expr.c | |
| parent | cb60c134e23d6c8c013ad89a4c1cb6e28cac94b6 (diff) | |
| download | gcc-58b6e04789a04563418234e753835ee6248bf4d8.zip gcc-58b6e04789a04563418234e753835ee6248bf4d8.tar.gz gcc-58b6e04789a04563418234e753835ee6248bf4d8.tar.bz2 | |
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
From-SVN: r118492
Diffstat (limited to 'gcc/fortran/trans-expr.c')
| -rw-r--r-- | gcc/fortran/trans-expr.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index f4fcea5..9e44bfd 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1715,9 +1715,14 @@ gfc_conv_aliased_arg (gfc_se * parmse, gfc_expr * expr, } else { - /* Make sure that the temporary declaration survives. */ - tmp = gfc_finish_block (&body); - gfc_add_expr_to_block (&loop.pre, tmp); + /* Make sure that the temporary declaration survives by merging + all the loop declarations into the current context. */ + for (n = 0; n < loop.dimen; n++) + { + gfc_merge_block_scope (&body); + body = loop.code[loop.order[n]]; + } + gfc_merge_block_scope (&body); } /* Add the post block after the second loop, so that any |
