gcc/testsuite/gfortran.dg/stmt_func_1.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "" } |
| 3 | ! |
| 4 | ! PR fortran/47542 |
| 5 | ! |
| 6 | integer, target, save :: tgt = 77 |
| 7 | integer, pointer ::ptr_stmt ! { dg-error "Statement function .ptr_stmt. at .1. may not have pointer or allocatable attribute" } |
| 8 | integer, allocatable :: alloc_stmt ! { dg-error "Statement function .alloc_stmt. at .1. may not have pointer or allocatable attribute" } |
| 9 | |
| 10 | ptr_stmt() = tgt |
| 11 | alloc_stmt() = 78 |
| 12 | end |