re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_34.f90
blob031f74418ca33e289767a6084b212159930486b3
1 ! { dg-do run }
3 ! PR 51082: [F03] Wrong result for a pointer to a proc-pointer component
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7 program ala
8 implicit none
10 type process_list
11 procedure(ala1), pointer, nopass :: process
12 end type
14 type(process_list), target :: p_list
15 type(process_list), pointer :: p
17 p_list%process => ala1
18 p => p_list
20 write(*,*) p_list%process(1.0)
21 write(*,*) p%process(1.0) !!!! failed
23 contains
25 real function ala1(x)
26 real, intent(in) :: x
27 ala1 = x
28 end function
30 end program