annotate gcc/testsuite/gfortran.dg/ptr-func-2.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ! { dg-options "-std=f2003 " }
111
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! PR fortran/46100
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! Pointer function as definable actual argument
kono
parents:
diff changeset
7 ! - a Fortran 2008 feature
kono
parents:
diff changeset
8 !
kono
parents:
diff changeset
9 integer, target :: tgt
kono
parents:
diff changeset
10 call one (two ()) ! { dg-error "Fortran 2008: Pointer functions" }
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
11 if (tgt /= 774) STOP 1
111
kono
parents:
diff changeset
12 contains
kono
parents:
diff changeset
13 subroutine one (x)
kono
parents:
diff changeset
14 integer, intent(inout) :: x
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
15 if (x /= 34) STOP 2
111
kono
parents:
diff changeset
16 x = 774
kono
parents:
diff changeset
17 end subroutine one
kono
parents:
diff changeset
18 function two ()
kono
parents:
diff changeset
19 integer, pointer :: two
kono
parents:
diff changeset
20 two => tgt
kono
parents:
diff changeset
21 two = 34
kono
parents:
diff changeset
22 end function two
kono
parents:
diff changeset
23 end
kono
parents:
diff changeset
24