diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-12-21 13:59:57 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2006-12-21 13:59:57 +0000 |
commit | 5dba0fb8453e71c6f03f7a00b41016fc327f89f9 (patch) | |
tree | 2f27f438293ad3f36bf84e1596b786342734d958 /gcc | |
parent | 5075abae44d4c23e075a7210635306ea21e55305 (diff) | |
download | gcc-5dba0fb8453e71c6f03f7a00b41016fc327f89f9.zip gcc-5dba0fb8453e71c6f03f7a00b41016fc327f89f9.tar.gz gcc-5dba0fb8453e71c6f03f7a00b41016fc327f89f9.tar.bz2 |
re PR fortran/30202 ([4.1 only] ICE in trans-array.c)
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30202
* trans-array.c (gfc_conv_function_call): Use parmse.expr for
the nullifying of intent(out) arguments rather than the backend
declaration.
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30202
* gfortran.dg/alloc_comp_basics_3.f90: New test.
From-SVN: r120109
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-expr.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90 | 18 |
4 files changed, 31 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dbc724a..c0dd40a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2006-12-21 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/30202 + * trans-array.c (gfc_conv_function_call): Use parmse.expr for + the nullifying of intent(out) arguments rather than the backend + declaration. + 2006-12-20 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/25392 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index bd79834..6d46cd4 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -2068,9 +2068,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, if (fsym && fsym->attr.allocatable && fsym->attr.intent == INTENT_OUT) { - tmp = e->symtree->n.sym->backend_decl; - if (e->symtree->n.sym->attr.dummy) - tmp = build_fold_indirect_ref (tmp); + tmp = build_fold_indirect_ref (parmse.expr); tmp = gfc_trans_dealloc_allocated (tmp); gfc_add_expr_to_block (&se->pre, tmp); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c5739de..fb6666e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-12-21 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/30202 + * gfortran.dg/alloc_comp_basics_3.f90: New test. + 2006-12-21 Jakub Jelinek <jakub@redhat.com> PR middle-end/30262 diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90 new file mode 100644 index 0000000..9140cd2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90 @@ -0,0 +1,18 @@ +! { dg-do compile } +! Test the patch for PR30202 in which the INTENT(OUT) +! caused an ICE. +! +! Contributed by Salvatore Filippone <sfilippone@uniroma2.it> +! +program class_scal_p + implicit none + type scal_p + real, allocatable :: b(:) + end type scal_p + type(scal_p) :: pd + call psb_geallv(pd%b) +contains + subroutine psb_geallv(x) + real, allocatable, intent(out) :: x(:) + end subroutine psb_geallv +end program class_scal_p |