1! { dg-do compile }
2!
3! PR fortran/34658
4!
5! Check for more COMMON constrains
6!
7block data
8  implicit none
9  integer :: x, a  ! { dg-warning "Initialized variable 'a' at .1. is in a blank COMMON" }
10  integer :: y = 5, b = 5 ! { dg-warning "Initialized variable 'b' at .1. is in a blank COMMON" }
11  data x/5/, a/5/
12  common // a, b
13  common /a/ x, y
14end block data
15
16subroutine foo()
17  implicit none
18  type t
19    sequence
20    integer :: i = 5
21  end type t
22  type(t) x ! { dg-error "may not have default initializer" }
23  common // x
24end subroutine foo
25
26program test
27  implicit none
28  common /a/ I ! { dg-warning "in COMMON but only in BLOCK DATA initialization" }
29  integer :: I = 43
30end program test
31