blob: 28328b799b309e1bf33d0b3ef1619e3be26a9d4d [file] [log] [blame]
! { dg-do run }
! { dg-additional-sources "section-errors-c.c dump-descriptors.c" }
! { dg-additional-options "-Wno-error -fcheck=all" }
! { dg-warning "command-line option '-fcheck=all' is valid for Fortran but not for C" "" { target *-*-* } 0 }
! This program tests that the CFI_section function properly detects
! invalid arguments. All the interesting things happen in the
! corresponding C code.
! The situation here seems to be that while TS29113 defines error codes
! for CFI_section, it doesn't actually require the implementation to detect
! those errors by saying the arguments "shall be" such-and-such, e.g. it is
! undefined behavior if they are not. In gfortran you can enable some
! run-time checking by building with -fcheck=all.
program testit
use iso_c_binding
implicit none
subroutine ctest () bind (c)
end subroutine
end interface
call ctest ()
end program