6 real (4) :: bar
, ar(2) = (/1.0,2.0/)
11 character(8) :: c
= "blooey"
16 print *, stmfun(%VAL(x
)) ! { dg-error "not allowed in this context" }
17 print *, sin (%VAL(2.0)) ! { dg-error "not allowed in this context" }
18 print *, foo (%VAL(1.0)) ! { dg-error "not allowed in this context" }
19 call foobar (%VAL(0.5)) ! { dg-error "not allowed in this context" }
20 print *, bar (%VAL(z
)) ! { dg-error "not of numeric type" }
21 print *, bar (%VAL(c
)) ! { dg-error "not of numeric type" }
22 print *, bar (%VAL(ar
)) ! { dg-error "cannot be an array" }
23 print *, bar (%VAL(0.0))
33 end program c_by_val_2