1! { dg-do compile } 2! 3! PR 47023: C_Sizeof: Rejects valid code 4! 5! Contributed by Janus Weil <janus@gcc.gnu.org> 6 7use iso_c_binding 8procedure(real) :: proc 9procedure(real), pointer :: pp 10pp => sin 11 12print *,sizeof(proc) ! { dg-error "shall not be a procedure" } 13print *,sizeof(pp) ! { dg-error "shall not be a procedure" } 14print *,sizeof(pp(0.)) 15print *,sizeof(sub) ! { dg-error "shall not be a procedure" } 16print *,sizeof(func) ! { dg-error "shall not be a procedure" } 17print *,sizeof(func()) 18 19contains 20 21 subroutine sub 22 end subroutine 23 24 real function func() 25 func = 0. 26 end function 27 28end 29