1! { dg-do compile }
2! { dg-options "-std=f2003" }
3!
4! PR fortran/48858
5!
6subroutine test
7  integer :: l, m
8  common /g/ l ! { dg-error "Fortran 2008: COMMON block 'g' with binding label at .1. sharing the identifier with global non-COMMON-block entity at .2." }
9  common /jj/ m ! { dg-error "Global name 'jj' at .1. is already being used as a COMMON at .2." }
10  bind(C,name="bar") :: /g/
11  bind(C,name="foo") :: /jj/
12end
13
14subroutine g ! { dg-error "Fortran 2008: COMMON block 'g' with binding label at .1. sharing the identifier with global non-COMMON-block entity at .2." }
15  call jj()  ! { dg-error "Global name 'jj' at .1. is already being used as a COMMON at .2." }
16end
17
18
19