gcc/testsuite/gfortran.dg/pointer_check_13.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-Wall -Wno-uninitialized" } |
| 3 | ! |
| 4 | ! PR fortran/56477 |
| 5 | ! The pointer target live range checking code used to trigger a NULL pointer |
| 6 | ! dereference with the following case. |
| 7 | ! |
| 8 | ! Contributed by Andrew Benson <[email protected]> |
| 9 | ! |
| 10 | module s |
| 11 | contains |
| 12 | function so() |
| 13 | implicit none |
| 14 | integer, target :: so |
| 15 | integer, pointer :: sp |
| 16 | sp => so |
| 17 | return |
| 18 | end function So |
| 19 | end module s |