Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/c_sizeof_6.f90 @ 127:4c56639505ff
fix function.c and add CbC-example Makefile
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 18:46:58 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
line wrap: on
line source
! { dg-do compile } ! program foo use iso_c_binding, only: c_int, c_char, c_sizeof integer(kind=c_int) :: i character(kind=c_char,len=1),parameter :: str2(4) = ["a","b","c","d"] i = c_sizeof(str2(1:3)) ! { dg-error "must be an interoperable data" } if (i /= 3) call abort() end program foo