annotate gcc/testsuite/gfortran.dg/sizeof_2.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 !
kono
parents:
diff changeset
3 ! PR fortran/56650
kono
parents:
diff changeset
4 ! PR fortran/36437
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 subroutine foo(x, y)
kono
parents:
diff changeset
7 use iso_c_binding
kono
parents:
diff changeset
8 type(*) :: x
kono
parents:
diff changeset
9 integer :: y(*)
kono
parents:
diff changeset
10 integer(8) :: ii
kono
parents:
diff changeset
11 procedure() :: proc
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 ii = sizeof (x) ! { dg-error "'x' argument of 'sizeof' intrinsic at \\(1\\) shall not be TYPE\\(\\*\\)" }
kono
parents:
diff changeset
14 ii = c_sizeof (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic c_sizeof" }
kono
parents:
diff changeset
15 ii = storage_size (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic storage_size" }
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 ii = sizeof (y) ! { dg-error "shall not be an assumed-size array" }
kono
parents:
diff changeset
18 ii = c_sizeof (y) ! { dg-error "shall not be an assumed-size array" }
kono
parents:
diff changeset
19 ii = storage_size (y) ! okay, element-size is known
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 ii = sizeof (proc) ! { dg-error "shall not be a procedure" }
kono
parents:
diff changeset
22 ii = c_sizeof (proc) ! { dg-error "Procedure unexpected as argument" }
kono
parents:
diff changeset
23 ii = storage_size (proc) ! { dg-error "shall not be a procedure" }
kono
parents:
diff changeset
24 end