2 ! { dg-options "-fcheck=pointer" }
3 ! { dg-shouldfail "Argument not allocated" }
4 ! { dg-output "Fortran runtime error: Allocatable actual argument 'c_init2' is not allocated" }
6 ! Tests fix for PR100136
8 ! Test cut down from PR58586
11 module test_pr58586_mod
18 type(a
), allocatable
:: a
23 subroutine add_class_c (d
)
27 class(c
) function c_init2()
28 allocatable
:: c_init2
31 end module test_pr58586_mod
36 ! This needs to execute, to see whether the segfault at runtime is resolved
37 call add_class_c(c_init2())