blob: e1e3517629485ec5a1dd15b5c17cae7424f61776 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
! { dg-do compile }
!
! PR 42051: [OOP] ICE on array-valued function with CLASS formal argument
!
! Original test case by Damian Rouson <damian@rouson.net>
! Modified by Janus Weil <janus@gcc.gnu.org>
type grid
end type
contains
function return_x(this) result(this_x)
class(grid) :: this
real ,dimension(1) :: this_x
end function
subroutine output()
type(grid) :: mesh
real ,dimension(1) :: x
x = return_x(mesh)
end subroutine
end
|