Fix compilation failure with C++98 compilers
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_18.f90
blob3d065867dc8cd9de336bc80fc44f7dc19f0c7e4c
1 ! { dg-do run }
3 ! PR 40176: Fortran 2003: Procedure pointers with array return value
5 ! Original test case by Barron Bichon <barron.bichon@swri.org>
6 ! Modified by Janus Weil <janus@gcc.gnu.org>
8 PROGRAM test_prog
10 PROCEDURE(triple), POINTER :: f
12 f => triple
13 if (sum(f(2.,4.)-triple(2.,4.))>1E-3) STOP 1
15 CONTAINS
17 FUNCTION triple(a,b) RESULT(tre)
18 REAL, INTENT(in) :: a, b
19 REAL :: tre(2)
20 tre(1) = 3.*a
21 tre(2) = 3.*b
22 END FUNCTION triple
24 END PROGRAM test_prog