1! { dg-do compile } 2! 3! PR fortran/34655 4! 5! Check for F2003's 5.5.2.5 Restrictions on common and equivalence 6! Test case contributed by Joost VandeVondele. 7! 8implicit none 9type data_type 10 sequence 11 integer :: I = 7 12end type data_type 13 14 15type data_type2 16 sequence 17 integer :: I 18end type data_type2 19 20type(data_type) :: dd, ff 21type(data_type2) :: gg 22integer :: j, k, m 23EQUIVALENCE(dd,J) ! { dg-error "with default initialization cannot be in EQUIVALENCE with a variable in COMMON" } 24EQUIVALENCE(ff,k) 25EQUIVALENCE(gg,m) 26COMMON /COM/ j 27COMMON /COM/ m 28END 29