aarch64: Add vector floating point extend pattern [PR113880, PR113869]
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_13.f90
blobc0a8b959d6e309b68fba0e27ac5ef384bae20830
1 ! { dg-do run }
3 ! PR 40882: [F03] infinite recursion in gfc_get_derived_type with PPC returning derived type.
4 ! At the same time, check that a formal argument does not cause infinite recursion (PR 40870).
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
8 implicit none
10 type :: t
11 integer :: data
12 procedure(foo), pointer, nopass :: ppc
13 procedure(type(t)), pointer, nopass :: ppc2
14 end type
16 type(t) :: o,o2
18 o%data = 1
19 o%ppc => foo
21 o2 = o%ppc(o)
23 if (o%data /= 1) STOP 1
24 if (o2%data /= 5) STOP 2
25 if (.not. associated(o%ppc)) STOP 3
26 if (associated(o2%ppc)) STOP 4
28 contains
30 function foo(arg)
31 type(t) :: foo, arg
32 foo%data = arg%data * 5
33 foo%ppc => NULL()
34 end function
36 end