c++: constrained lambda error-recovery [PR108972]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr61960.f90
blob000ff93ce5a1019e5a4cc1d338dc65cc689fc9d3
1 ! { dg-do compile }
3 module data_func_mod
4 implicit none
5 integer, parameter :: sp = 4
6 type :: data_type
7 real(kind=sp), pointer, dimension(:, :) :: data => null()
8 integer :: nr_rows = 0, nr_cols = 0
9 end type data_type
11 contains
13 function get_row(this, i) result(row)
14 implicit none
15 type(data_type), intent(in) :: this
16 integer, intent(in) :: i
17 real(kind=sp), dimension(this%nr_cols) :: row
18 row = this%data(:, i)
19 end function get_row
21 subroutine print_matrix(m, i, fmt_str)
22 implicit none
23 class(data_type), intent(in) :: m
24 integer, intent(in) :: i
25 character(len=20), intent(in) :: fmt_str
26 write (unit=6, fmt=fmt_str) get_row(m, i)
27 end subroutine print_matrix
29 end module data_func_mod