[AArch64] Merge stores of D-register values with different modes
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_function_actual_1.f90
blob53ae993b3b0324da375f841273c77e6a1090b58e
1 ! { dg-do run }
2 ! { dg-options "-std=legacy" }
4 ! Tests the fix for PR31209, in which an ICE would result because
5 ! the reference to the pointer function f would be indirected, as
6 ! if it were the result that is being passed.
8 ! COntributed by Joost VandeVondele <jv244@cam.ac.uk>
10 FUNCTION F() RESULT(RES)
11 INTEGER, POINTER :: RES
12 ALLOCATE(RES)
13 RES=2
14 END FUNCTION F
16 SUBROUTINE S1(f,*,*)
17 INTERFACE
18 FUNCTION F() RESULT(RES)
19 INTEGER, POINTER :: RES
20 END FUNCTION F
21 END INTERFACE
22 RETURN F()
23 END SUBROUTINE
25 PROGRAM TEST
26 INTERFACE
27 FUNCTION F() RESULT(RES)
28 INTEGER, POINTER :: RES
29 END FUNCTION F
30 END INTERFACE
33 INTERFACE
34 SUBROUTINE S1(f,*,*)
35 INTERFACE
36 FUNCTION F() RESULT(RES)
37 INTEGER, POINTER :: RES
38 END FUNCTION F
39 END INTERFACE
40 END SUBROUTINE
41 END INTERFACE
43 CALL S1(F,*1,*2)
45 1 CONTINUE
46 STOP 1
48 GOTO 3
49 2 CONTINUE
51 3 CONTINUE
52 END