bpf: create modifier for mem operand for xchg and cmpxchg
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_common_1.f90
blob25ba4c5a037a70a81be471eaa74413981810340c
1 ! { dg-do run }
2 ! { dg-options "-std=f2003" }
4 ! PR fortran/36592
6 ! Procedure Pointers inside COMMON blocks.
7 ! (Allowed in F03, but forbidden in F08.)
9 ! Contributed by Janus Weil <janus@gcc.gnu.org>.
11 subroutine one()
12 implicit none
13 procedure(real), pointer :: p1,p2
14 integer :: a,b
15 common /com/ p1,p2,a,b
16 if (a/=5 .or. b/=-9 .or. p1(0.0)/=1.0 .or. p2(0.0)/=0.0) STOP 1
17 end subroutine one
19 program main
20 implicit none
21 integer :: x,y
22 intrinsic sin,cos
23 procedure(real), pointer :: func1
24 real, external :: func2
25 pointer func2
26 common /com/ func1,func2,x,y
27 x = 5
28 y = -9
29 func1 => cos
30 func2 => sin
31 call one()
32 end program main