re PR fortran/72832 ([OOP] ALLOCATE with SOURCE fails to allocate requested dimensions)
authorAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 13 Oct 2016 08:51:21 +0000 (10:51 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 13 Oct 2016 08:51:21 +0000 (10:51 +0200)
commit92c5266bbd5378a5513f43edf23b1394621675a3
treebe349c6c53e4349df797771ee987f711b4e773ce
parent1202f33e5e1e4236fec7a3c1d14c16b5f13c2aaa
re PR fortran/72832 ([OOP] ALLOCATE with SOURCE fails to allocate requested dimensions)

gcc/fortran/ChangeLog:

2016-09-01  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/72832
* trans-expr.c (gfc_copy_class_to_class): Add generation of
runtime array bounds check.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to
get the descriptor of a function returning a class object.
* trans-stmt.c (gfc_trans_allocate): Use the array spec on the
array to allocate instead of the array spec from source=.

gcc/testsuite/ChangeLog:

2016-09-01  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/72832
* gfortran.dg/allocate_with_source_22.f03: New test.
* gfortran.dg/allocate_with_source_23.f03: New test.  Expected to
fail.

From-SVN: r241088
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans-intrinsic.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_with_source_22.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/allocate_with_source_23.f03 [new file with mode: 0644]