1! { dg-do compile }
2! this is to simply test that the various ways the use statement can
3! appear are handled by the compiler, since i did a special treatment
4! of the intrinsic iso_c_binding module.  note: if the user doesn't
5! provide the 'intrinsic' keyword, the compiler will check for a user
6! provided module by the name of iso_c_binding before using the
7! intrinsic one.  --Rickett, 09.26.06
8module use_stmt_0
9  ! this is an error because c_ptr_2 does not exist
10  use, intrinsic :: iso_c_binding, only: c_ptr_2 ! { dg-error "Symbol 'c_ptr_2' referenced at \\(1\\) not found" }
11end module use_stmt_0
12
13module use_stmt_1
14  ! this is an error because c_ptr_2 does not exist
15  use iso_c_binding, only: c_ptr_2 ! { dg-error "Symbol 'c_ptr_2' referenced at \\(1\\) not found" }
16end module use_stmt_1
17
18module use_stmt_2
19  ! works fine
20  use, intrinsic :: iso_c_binding, only: c_ptr
21end module use_stmt_2
22
23module use_stmt_3
24  ! works fine
25  use iso_c_binding, only: c_ptr
26end module use_stmt_3
27
28module use_stmt_4
29  ! works fine
30  use, intrinsic :: iso_c_binding
31end module use_stmt_4
32
33module use_stmt_5
34  ! works fine
35  use iso_c_binding
36end module use_stmt_5
37
38module use_stmt_6
39  ! hmm, is this an error?  if so, it's not being caught...
40  ! --Rickett, 09.13.06
41  use, intrinsic :: iso_c_binding, only: c_int, c_int
42end module use_stmt_6
43
44module use_stmt_7
45  ! hmm, is this an error?  if so, it's not being caught...
46  ! --Rickett, 09.13.06
47  use iso_c_binding, only: c_int, c_int
48end module use_stmt_7
49