Debian Codegraph @

gcc/testsuite/gfortran.dg/init_flag_16.f03

raw
1 ! { dg-do compile }
2 ! { dg-options "-finit-derived" }
3 !
4 ! PR fortran/82886
5 !
6 ! Test a regression which caused an ICE when -finit-derived was given without
7 ! other -finit-* flags, especially for derived-type components with potentially
8 ! hidden basic integer components.
9 !
10
11 program pr82886
12
13 use, intrinsic :: iso_c_binding, only: c_ptr, c_null_ptr
14 type t
15 type(c_ptr) :: my_c_ptr
16 end type
17
18 contains
19
20 subroutine sub0() bind(c)
21 type(t), target :: my_f90_type
22 my_f90_type%my_c_ptr = c_null_ptr
23 end subroutine
24
25 end