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
This commit is contained in:
parent
343c05d39f
commit
e520d5f02a
4 changed files with 28 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
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-28 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/62536
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-01-30 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/69566
|
||||
* gfortran.dg/unlimited_polymorphic_25.f03: New test.
|
||||
|
||||
2016-01-30 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR c++/68490
|
||||
|
|
14
gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f03
Normal file
14
gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f03
Normal file
|
@ -0,0 +1,14 @@
|
|||
! { dg-do compile }
|
||||
!
|
||||
! Tests the fix for PR69566, in which a boolean expression testing a
|
||||
! the component of a pointer did not check the pointer, resulting in
|
||||
! the ICE.
|
||||
!
|
||||
! Contributed by Janus Weil <janus@gcc.gnu.org>
|
||||
!
|
||||
print *, associated(return_pointer()) ! ICE
|
||||
contains
|
||||
function return_pointer()
|
||||
class(*), pointer :: return_pointer(:)
|
||||
end function
|
||||
end
|
Loading…
Add table
Reference in a new issue