diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2016-01-30 17:44:56 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2016-01-30 17:44:56 +0000 |
commit | e520d5f02a0cfa5d07a48a14f2b67af63884e9ed (patch) | |
tree | 66f16fc94949bc0d5590b9fd23904195383e552e /gcc/fortran/trans-expr.c | |
parent | 343c05d39f7fcdf55178853884113715bc7bcc2b (diff) | |
download | gcc-e520d5f02a0cfa5d07a48a14f2b67af63884e9ed.zip gcc-e520d5f02a0cfa5d07a48a14f2b67af63884e9ed.tar.gz gcc-e520d5f02a0cfa5d07a48a14f2b67af63884e9ed.tar.bz2 |
re PR fortran/69566 ([OOP] Failure of SELECT TYPE with unlimited polymorphic function result)
2016-01-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* trans-expr.c (gfc_conv_procedure_call): Correct expression
for 'ulim_copy', which was missing a test for 'comp'.
2016-01-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* gfortran.dg/unlimited_polymorphic_25.f03: New test.
From-SVN: r233011
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index c5ae4c5..74f519e 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -4723,8 +4723,9 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, is the third and fourth argument to such a function call a value denoting the number of elements to copy (i.e., most of the time the length of a deferred length string). */ - ulim_copy = formal == NULL && UNLIMITED_POLY (sym) - && strcmp ("_copy", comp->name) == 0; + ulim_copy = (formal == NULL) + && UNLIMITED_POLY (sym) + && comp && (strcmp ("_copy", comp->name) == 0); /* Evaluate the arguments. */ for (arg = args, argc = 0; arg != NULL; |