c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_23.f03
blobe1e3517629485ec5a1dd15b5c17cae7424f61776
1 ! { dg-do compile }
3 ! PR 42051: [OOP] ICE on array-valued function with CLASS formal argument
5 ! Original test case by Damian Rouson <damian@rouson.net>
6 ! Modified by Janus Weil <janus@gcc.gnu.org>
8   type grid
9   end type 
11 contains
13   function return_x(this) result(this_x)
14     class(grid) :: this
15     real  ,dimension(1) :: this_x
16   end function
18   subroutine output()
19     type(grid) :: mesh
20     real ,dimension(1) :: x
21     x = return_x(mesh)
22   end subroutine
24 end