2 ! This tests the "virtual fix" for PR19561, where functions returning
3 ! pointers to derived types were not generating correct code. This
4 ! testcase is based on a simplified example in the PR discussion.
6 ! Submitted by Paul Thomas pault@gcc.gnu.org
7 ! Slightly extended by Tobias Schlüter
15 function get (a
) result (b
)
16 type (mytype
), target
:: a
17 type (mytype
), pointer :: b
22 type (mytype
), target
:: a
23 type (mytype
), pointer :: get2
29 program func_derived_2
31 type (mytype
), target
:: x
32 type (mytype
), pointer :: y
35 if (y
%i
.ne
.42) call abort ()
39 if (y
%i
.ne
.112) call abort ()
40 end program func_derived_2