| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fcheck=pointer -fdump-tree-original" } |
| 3 |
! PR99112 - ICE with runtime diagnostics for SIZE intrinsic function |
| 4 |
|
| 5 |
module m |
| 6 |
type t |
| 7 |
end type |
| 8 |
contains |
| 9 |
function f (x, y) result(z) |
| 10 |
class(t) :: x(:) |
| 11 |
class(t) :: y(size(x)) |
| 12 |
type(t) :: z(size(x)) |
| 13 |
end |
| 14 |
function g (x) result(z) |
| 15 |
class(*) :: x(:) |
| 16 |
type(t) :: z(size(x)) |
| 17 |
end |
| 18 |
subroutine s () |
| 19 |
class(t), allocatable :: a(:), b(:), c(:), d(:) |
| 20 |
class(t), pointer :: p(:) |
| 21 |
c = f (a, b) |
| 22 |
d = g (p) |
| 23 |
end |
| 24 |
end |
| 25 |
! { dg-final { scan-tree-dump-times "_gfortran_runtime_error_at" 3 "original" } } |
| 26 |
! { dg-final { scan-tree-dump-times "Allocatable actual argument" 2 "original" } } |
| 27 |
! { dg-final { scan-tree-dump-times "Pointer actual argument" 1 "original" } } |