| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-fdump-tree-original" } |
| 3 |
! |
| 4 |
! PR fortran/48820 |
| 5 |
! |
| 6 |
! Ensure that the value of scalars to assumed-rank arrays is |
| 7 |
! copied back - and everything happens in the correct order. |
| 8 |
|
| 9 |
call sub(f()) |
| 10 |
contains |
| 11 |
subroutine sub(x) |
| 12 |
integer, pointer :: x(..) |
| 13 |
end subroutine sub |
| 14 |
function f() result(res) |
| 15 |
integer, pointer :: res |
| 16 |
end function f |
| 17 |
end |
| 18 |
|
| 19 |
! { dg-final { scan-tree-dump " = f \\(\\);.*desc.0.dtype = .*;.*desc.0.data = .void .. D.*;.*sub \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;" "original" } } |
| 20 |
|