re PR libfortran/80850 (Sourced allocate() fails to allocate a pointer)
authorPaul Thomas <pault@gcc.gnu.org>
Mon, 30 Oct 2017 22:07:25 +0000 (22:07 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 30 Oct 2017 22:07:25 +0000 (22:07 +0000)
commit59d7953a634a71f09d02b37ad3031b17ade60d15
tree287560dcf2ccf6975fc74b2fe5662da3698f6094
parent8581ce0a9d73021b110849b3992df0fc88978b6c
re PR libfortran/80850 (Sourced allocate() fails to allocate a pointer)

2017-10-30  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.

2017-10-30  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/80850
* gfortran.dg/class_64_f90 : New test.

From-SVN: r254244
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/class_64.f90 [new file with mode: 0644]