summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f90
blob: 40e3ac4d5d402ce3d7fde60a7a89558bdbebe5e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
MODULE globals
  TYPE :: type1
     sequence
     integer :: x
  END TYPE type1
  TYPE (type1) :: pdm_bps
  common /co/ pdm_bps
END module globals
BLOCK DATA
   use globals
END BLOCK DATA

program main
  use globals
  common /co/ pdm_bps ! { dg-error "already in a COMMON block" }
end program main
! { dg-final { cleanup-modules "globals" } }