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
This commit is contained in:
parent
5075abae44
commit
5dba0fb845
4 changed files with 31 additions and 3 deletions
|
@ -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<68>üter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
PR fortran/25392
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
18
gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90
Normal file
18
gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue