1! { dg-do compile } 2! { dg-options "-finit-derived -finit-local-zero -fdump-tree-original" } 3! 4! PR fortran/82972 5! 6! Make sure we do not ICE when generating initializers for c_ptr and c_funptr 7! components of derived types (and make sure they are properly initialized to 8! zero). 9! 10 11program init_flag_17 12 use iso_c_binding 13 implicit none 14 15 type :: ty 16 type(c_ptr) :: ptr ! = c_null_ptr 17 type(c_funptr) :: fptr ! = c_null_funptr 18 end type 19 20 type(ty) :: t 21 22 print *, t%ptr 23 print *, t%fptr 24 25end program 26 27! { dg-final { scan-tree-dump "\.ptr=0" "original" } } 28! { dg-final { scan-tree-dump "\.fptr=0" "original" } } 29