1*6c1ac141SIvan Zhechev! RUN: %python %S/test_errors.py %s %flang_fc1 264ab3302SCarolineConcattomodule m 364ab3302SCarolineConcatto public 447452b96STim Keith type t 547452b96STim Keith integer, private :: i 647452b96STim Keith end type 764ab3302SCarolineConcatto !ERROR: The default accessibility of this module has already been declared 847452b96STim Keith private !C869 964ab3302SCarolineConcattoend 1064ab3302SCarolineConcatto 1147452b96STim Keithsubroutine s1 1264ab3302SCarolineConcatto !ERROR: PUBLIC statement may only appear in the specification part of a module 1347452b96STim Keith public !C869 1447452b96STim Keithend 1547452b96STim Keith 1647452b96STim Keithsubroutine s2 1747452b96STim Keith !ERROR: PRIVATE attribute may only appear in the specification part of a module 1847452b96STim Keith integer, private :: i !C817 1947452b96STim Keithend 2047452b96STim Keith 2147452b96STim Keithsubroutine s3 2247452b96STim Keith type t 2347452b96STim Keith !ERROR: PUBLIC attribute may only appear in the specification part of a module 2447452b96STim Keith integer, public :: i !C817 2547452b96STim Keith end type 2647452b96STim Keithend 2747452b96STim Keith 2847452b96STim Keithmodule m4 2947452b96STim Keith interface 3047452b96STim Keith module subroutine s() 3147452b96STim Keith end subroutine 3247452b96STim Keith end interface 3347452b96STim Keithend 3447452b96STim Keithsubmodule(m4) sm4 3547452b96STim Keith !ERROR: PUBLIC statement may only appear in the specification part of a module 3647452b96STim Keith public !C869 3747452b96STim Keith !ERROR: PUBLIC attribute may only appear in the specification part of a module 3847452b96STim Keith real, public :: x !C817 3947452b96STim Keith type :: t 4047452b96STim Keith !ERROR: PRIVATE attribute may only appear in the specification part of a module 4147452b96STim Keith real, private :: y !C817 4247452b96STim Keith end type 4364ab3302SCarolineConcattoend 44