Imported Upstream version 4.7.2
[platform/upstream/gcc48.git] / gcc / testsuite / gfortran.dg / typebound_proc_17.f03
1 ! { dg-do compile }
2 !
3 ! PR 44962: [OOP] ICE with specification expression SIZE(<CLASS>)
4 !
5 ! Contributed by Satish.BD <bdsatish@gmail.com>
6
7
8 module array
9
10 type :: t_array
11   real, dimension(10) :: coeff
12 contains
13   procedure :: get_coeff
14 end type t_array
15
16 contains
17
18 function get_coeff(self) result(coeff)
19   class(t_array), intent(in) :: self
20   real, dimension(size(self%coeff)) :: coeff !! The SIZE here carashes !!
21 end function get_coeff
22
23 end module array
24
25
26 ! { dg-final { cleanup-modules "array" } }