2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_sizeof_6.f90
blob0b57964ea5bfe56e812bef24c71a71984f3a17b2
1 ! { dg-do compile }
3 program foo
5 use iso_c_binding, only: c_int, c_char, c_sizeof
7 integer(kind=c_int) :: i
9 character(kind=c_char,len=1),parameter :: str2(4) = ["a","b","c","d"]
11 i = c_sizeof(str2(1:3)) ! { dg-error "must be an interoperable data" }
13 if (i /= 3) call abort()
15 end program foo