| 1 |
! { dg-do compile } |
| 2 |
! PR fortran/105543 - function returning contiguous class array |
| 3 |
! Contributed by martin <[email protected]> |
| 4 |
|
| 5 |
module func_contiguous |
| 6 |
implicit none |
| 7 |
type :: a |
| 8 |
end type a |
| 9 |
contains |
| 10 |
function create1 () result(x) |
| 11 |
class(a), dimension(:), contiguous, pointer :: x |
| 12 |
end |
| 13 |
function create2 () |
| 14 |
class(a), dimension(:), contiguous, pointer :: create2 |
| 15 |
end |
| 16 |
function create3 () result(x) |
| 17 |
class(*), dimension(:), contiguous, pointer :: x |
| 18 |
end |
| 19 |
function create4 () |
| 20 |
class(*), dimension(:), contiguous, pointer :: create4 |
| 21 |
end |
| 22 |
end module func_contiguous |