OSDN Git Service

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