11556Srgrimes! { dg-do compile }
21556Srgrimes! Tests a number of error messages relating to derived type objects
31556Srgrimes! in common blocks.  Originally due to PR 33198
41556Srgrimes
51556Srgrimessubroutine one
61556Srgrimestype a
71556Srgrimes   sequence
81556Srgrimes   integer :: i = 1
91556Srgrimesend type a
101556Srgrimestype(a) :: t ! { dg-error "Derived type variable .t. in COMMON at ... may not have default initializer" }
111556Srgrimescommon /c/ t
121556Srgrimesend
131556Srgrimes
141556Srgrimessubroutine first
151556Srgrimestype a
161556Srgrimes   integer :: i
171556Srgrimes   integer :: j
181556Srgrimesend type a
191556Srgrimestype(a) :: t  ! { dg-error "Derived type variable .t. in COMMON at ... has neither the SEQUENCE nor the BIND.C. attribute" }
201556Srgrimescommon /c/ t
211556Srgrimesend
221556Srgrimes
231556Srgrimessubroutine prime
241556Srgrimestype a
251556Srgrimes   sequence
261556Srgrimes   integer, allocatable :: i(:)
271556Srgrimes   integer :: j
281556Srgrimesend type a
291556Srgrimestype(a) :: t  ! { dg-error "Derived type variable .t. in COMMON at ... has an ultimate component that is allocatable" }
301556Srgrimescommon /c/ t
311556Srgrimesend
321556Srgrimes
331556Srgrimessubroutine source
341556Srgrimesparameter(x=0.) ! { dg-error "COMMON block .x. at ... is used as PARAMETER at ..." }
351556Srgrimescommon /x/ i  ! { dg-error "COMMON block .x. at ... is used as PARAMETER at ..." }
361556Srgrimesintrinsic sin
371556Srgrimescommon /sin/ j ! { dg-error "COMMON block .sin. at ... is also an intrinsic procedure" }
3850471Speterend subroutine source
391556Srgrimes