mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-22 10:49:48 +08:00
re PR fortran/64578 ([OOP] Seg-fault and ICE with unlimited polymorphic array pointer function)
2015-01-17 Paul Thomas <pault@gcc.gnu.org> PR fortran/64578 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that before reinitializing rse, to add the rse.pre to block before creating 'ptrtemp'. * trans-intrinsic.c (gfc_conv_associated): Deal with the class data being a descriptor. 2015-01-17 Paul Thomas <pault@gcc.gnu.org> PR fortran/64578 * gfortran.dg/unlimited_polymorphic_21.f90: New test From-SVN: r219802
This commit is contained in:
parent
9b5485174b
commit
029b2d5596
@ -1,3 +1,12 @@
|
||||
2015-01-17 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/64578
|
||||
* trans-expr.c (gfc_trans_pointer_assignment): Make sure that
|
||||
before reinitializing rse, to add the rse.pre to block before
|
||||
creating 'ptrtemp'.
|
||||
* trans-intrinsic.c (gfc_conv_associated): Deal with the class
|
||||
data being a descriptor.
|
||||
|
||||
2015-01-17 Andre Vehreschild <vehre@gmx.de>
|
||||
|
||||
PR fortran/60357
|
||||
|
@ -7075,6 +7075,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2)
|
||||
rse.expr = gfc_class_data_get (rse.expr);
|
||||
else
|
||||
{
|
||||
gfc_add_block_to_block (&block, &rse.pre);
|
||||
tmp = gfc_create_var (TREE_TYPE (rse.expr), "ptrtemp");
|
||||
gfc_add_modify (&lse.pre, tmp, rse.expr);
|
||||
|
||||
@ -7146,6 +7147,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2)
|
||||
}
|
||||
else
|
||||
{
|
||||
gfc_add_block_to_block (&block, &rse.pre);
|
||||
tmp = gfc_create_var (TREE_TYPE (rse.expr), "ptrtemp");
|
||||
gfc_add_modify (&lse.pre, tmp, rse.expr);
|
||||
|
||||
|
@ -6553,8 +6553,12 @@ gfc_conv_associated (gfc_se *se, gfc_expr *expr)
|
||||
&& arg1->expr->symtree->n.sym->attr.dummy)
|
||||
arg1se.expr = build_fold_indirect_ref_loc (input_location,
|
||||
arg1se.expr);
|
||||
if (arg1->expr->ts.type == BT_CLASS)
|
||||
if (arg1->expr->ts.type == BT_CLASS)
|
||||
{
|
||||
tmp2 = gfc_class_data_get (arg1se.expr);
|
||||
if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp2)))
|
||||
tmp2 = gfc_conv_descriptor_data_get (tmp2);
|
||||
}
|
||||
else
|
||||
tmp2 = arg1se.expr;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2015-01-17 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/64578
|
||||
* gfortran.dg/unlimited_polymorphic_21.f90: New test
|
||||
|
||||
2015-01-17 Andre Vehreschild <vehre@gmx.de>
|
||||
|
||||
PR fortran/60357
|
||||
|
Loading…
Reference in New Issue
Block a user