1! { dg-do compile }
2! { dg-options "-std=legacy" }
3!
4! PR fortran/25062
5!
6! F2003: 16.2.1
7! "A name that identifies a common block in a scoping unit shall not be used
8!  to identify a constant or an intrinsic procedure in that scoping unit."
9!
10subroutine try
11 implicit none
12 COMMON /s/ J
13 COMMON /bar/ I
14 INTEGER I, J
15 real s, x
16 s(x)=sin(x)
17 print *, s(5.0)
18 call bar()
19contains
20 subroutine bar
21   print *, 'Hello world'
22 end subroutine bar
23
24end subroutine try
25
26program test
27 implicit none
28 COMMON /abs/ J ! { dg-error "is also an intrinsic procedure" }
29 intrinsic :: abs
30 INTEGER J
31 external try
32 call try
33end program test
34