PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / init_flag_16.f03
bloba39df63d7723c1c8070c1545ad848d2b05de8b7d
1 ! { dg-do compile }
2 ! { dg-options "-finit-derived" }
4 ! PR fortran/82886
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.
11 program pr82886
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
18 contains
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
25 end