re PR fortran/78356 ([OOP] segfault allocating polymorphic variable with polymorphic...
authorAndre Vehreschild <vehre@gcc.gnu.org>
Wed, 16 Nov 2016 13:45:29 +0000 (14:45 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Wed, 16 Nov 2016 13:45:29 +0000 (14:45 +0100)
commitdc9e0b66b22fa73f396645d7efd8b73649f2fe6b
treee7b4f5f3869d8e0b144aa416e4efbff8d47e19d5
parent45a9968b378d54ced8f742e1ff8b01c9378b339c
re PR fortran/78356 ([OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component)

gcc/fortran/ChangeLog:

2016-11-16  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/78356
* class.c (gfc_is_class_scalar_expr): Prevent taking an array ref for
a component ref.
* trans-expr.c (gfc_trans_assignment_1): Ensure a reference to the
object to copy is generated, when assigning class objects.

gcc/testsuite/ChangeLog:

2016-11-16  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/78356
* gfortran.dg/class_allocate_23.f08: New test.

From-SVN: r242490
gcc/fortran/ChangeLog
gcc/fortran/class.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/class_allocate_23.f08 [new file with mode: 0644]