RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_init_10.f90
blob9e06b8ac218c3497d29380e89f0b0479c3f45462
1 ! { dg-do run }
2 ! { dg-require-visibility "" }
4 ! PR 84504: [F08] procedure pointer variables cannot be initialized with functions returning pointers
6 ! Contributed by Sriram Swaminarayan <sriram@pobox.com>
8 module test_mod
9 implicit none
10 private
11 integer, target :: i = 333
12 procedure(the_proc), pointer, public :: ptr => the_proc
13 contains
14 function the_proc()
15 integer, pointer :: the_proc
16 the_proc => i
17 end function
18 end module
20 program test_prog
21 use test_mod
22 integer, pointer :: ip
23 ip => ptr()
24 if (ip /= 333) stop 1
25 end