1! { dg-do compile } 2! 3! PR 44649: [OOP] F2008: storage_size intrinsic 4! 5! Contributed by Janus Weil <janus@gcc.gnu.org> 6 7use iso_c_binding, only: c_int, c_sizeof 8 9type, bind(c) :: t 10 integer(c_int) :: j 11end type 12 13integer(4) :: i1 14integer(c_int) :: i2 15type(t) :: x 16 17print *,c_sizeof(i1) 18print *,c_sizeof(i2) 19print *,c_sizeof(x) 20print *, c_sizeof(ran()) 21 22print *,storage_size(1.0,4) 23print *,storage_size(1.0,3.2) ! { dg-error "must be INTEGER" } 24print *,storage_size(1.0,(/1,2/)) ! { dg-error "must be a scalar" } 25print *,storage_size(1.0,irand()) ! { dg-error "must be a constant" } 26 27end 28