gcc/testsuite/gfortran.dg/transfer_resolve_3.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdump-tree-original" } |
| 3 | ! |
| 4 | ! PR fortran/56079 |
| 5 | ! |
| 6 | use iso_c_binding |
| 7 | implicit none |
| 8 | type t |
| 9 | type(c_ptr) :: ptr = c_null_ptr |
| 10 | end type t |
| 11 | |
| 12 | type(t), parameter :: para = t() |
| 13 | integer(c_intptr_t) :: intg |
| 14 | intg = transfer (para, intg) |
| 15 | intg = transfer (para%ptr, intg) |
| 16 | end |
| 17 | |
| 18 | ! { dg-final { scan-tree-dump-times "intg = 0;" 2 "original" } } |
| 19 |