1! { dg-do compile }
2! See PR fortran/36251.
3module a
4  implicit none
5  integer :: i = 42
6end module a
7
8! Causes ICE
9module b
10  use iso_c_binding
11  use a
12  implicit none
13  bind(c) :: a  ! { dg-error "applied to" }
14end module b
15
16! Causes ICE
17module d
18  use a
19  implicit none
20  bind(c) :: a  ! { dg-error "applied to" }
21end module d
22