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