re PR fortran/46841 ([F03] ICE on allocating array of procedure pointers)
2010-12-13 Janus Weil <janus@gcc.gnu.org> PR fortran/46841 * trans-expr.c (gfc_trans_subcomponent_assign): Handle array-valued procedure pointer components. 2010-12-13 Janus Weil <janus@gcc.gnu.org> PR fortran/46841 * gfortran.dg/proc_ptr_comp_26.f90: New. From-SVN: r167750
This commit is contained in:
parent
0d64a1a38f
commit
b54b7821c6
4 changed files with 34 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-12-13 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/46841
|
||||
* trans-expr.c (gfc_trans_subcomponent_assign): Handle array-valued
|
||||
procedure pointer components.
|
||||
|
||||
2010-12-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/46884
|
||||
|
|
|
@ -4452,7 +4452,7 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr)
|
|||
gfc_class_null_initializer (&cm->ts));
|
||||
gfc_add_expr_to_block (&block, tmp);
|
||||
}
|
||||
else if (cm->attr.dimension)
|
||||
else if (cm->attr.dimension && !cm->attr.proc_pointer)
|
||||
{
|
||||
if (cm->attr.allocatable && expr->expr_type == EXPR_NULL)
|
||||
gfc_conv_descriptor_data_set (&block, dest, null_pointer_node);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-12-13 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/46841
|
||||
* gfortran.dg/proc_ptr_comp_26.f90: New.
|
||||
|
||||
2010-12-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/pack9.adb: XFAIL everywhere.
|
||||
|
|
22
gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90
Normal file
22
gcc/testsuite/gfortran.dg/proc_ptr_comp_26.f90
Normal file
|
@ -0,0 +1,22 @@
|
|||
! { dg-do compile }
|
||||
!
|
||||
! PR 46841: [F03] ICE on allocating array of procedure pointers
|
||||
!
|
||||
! Contributed by Martien Hulsen <m.a.hulsen@tue.nl>
|
||||
|
||||
type vfunc_p
|
||||
procedure (dum_vfunc), pointer, nopass :: p => null()
|
||||
end type vfunc_p
|
||||
|
||||
type(vfunc_p), allocatable, dimension(:) :: vfunc1
|
||||
|
||||
allocate(vfunc1(10))
|
||||
|
||||
contains
|
||||
|
||||
function dum_vfunc ()
|
||||
real, dimension(2) :: dum_vfunc
|
||||
dum_vfunc = 0
|
||||
end function dum_vfunc
|
||||
|
||||
end
|
Loading…
Add table
Reference in a new issue