PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / warn_target_lifetime_2.f90
blobbfcb7aca4776907a29c0b339077c638b37378d2f
1 ! { dg-do compile }
2 ! { dg-options "-Wtarget-lifetime" }
4 ! PR fortran/54301
6 function f()
7 integer, pointer :: f
8 integer, target :: t
9 f => t ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
10 end