AArch64: correct constraint on Upl early clobber alternatives
[official-gcc.git] / gcc / testsuite / gfortran.dg / sizeof_2.f90
blobd1655c63449c6c7d3308d2ea6df95f492de7cb92
1 ! { dg-do compile }
3 ! PR fortran/56650
4 ! PR fortran/36437
6 subroutine foo(x, y)
7 use iso_c_binding
8 type(*) :: x
9 integer :: y(*)
10 integer(8) :: ii
11 procedure() :: proc
13 ii = sizeof (x) ! { dg-error "'x' argument of 'sizeof' intrinsic at \\(1\\) shall not be TYPE\\(\\*\\)" }
14 ii = c_sizeof (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic c_sizeof" }
15 ii = storage_size (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic storage_size" }
17 ii = sizeof (y) ! { dg-error "shall not be an assumed-size array" }
18 ii = c_sizeof (y) ! { dg-error "\[Aa\]ssumed-size array" }
19 ii = storage_size (y) ! okay, element-size is known
21 ii = sizeof (proc) ! { dg-error "shall not be a procedure" }
22 ii = c_sizeof (proc) ! { dg-error "Procedure unexpected as argument" }
23 ii = storage_size (proc) ! { dg-error "shall not be a procedure" }
24 end