diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/bind_c_module.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/bind_c_module.f90 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/bind_c_module.f90 b/gcc/testsuite/gfortran.dg/bind_c_module.f90 new file mode 100644 index 000000000..a17f5d0b3 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bind_c_module.f90 @@ -0,0 +1,22 @@ +! { dg-do compile } +! See PR fortran/36251. +module a + implicit none + integer :: i = 42 +end module a + +! Causes ICE +module b + use iso_c_binding + use a + implicit none + bind(c) :: a ! { dg-error "applied to" } +end module b + +! Causes ICE +module d + use a + implicit none + bind(c) :: a ! { dg-error "applied to" } +end module d +! { dg-final { cleanup-modules "a" } } |