52 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Test for checking namelist constraints, C8103-C81053 4module dup5 integer dupName6 integer uniqueName7end module dup8 9subroutine C8103a(x)10 use dup, only: uniqueName, dupName11 integer :: x12 !ERROR: 'dupname' is already declared in this scoping unit13 namelist /dupName/ x, x14 namelist /nl/ uniquename ! ok15end subroutine C8103a16 17subroutine C8103b(y)18 use dup, only: uniqueName19 integer :: y20 namelist /dupName/ y, y21end subroutine C8103b22 23subroutine C8104a(ivar, jvar)24 integer :: ivar(10,8)25 integer :: jvar(*)26 NAMELIST /NLIST/ ivar27 !ERROR: A namelist group object 'jvar' must not be assumed-size28 NAMELIST /NLIST/ jvar29end subroutine C8104a30 31subroutine C8104b(ivar, jvar)32 integer, dimension(*) :: jvar33 !ERROR: A namelist group object 'jvar' must not be assumed-size34 NAMELIST /NLIST/ ivar, jvar35end subroutine C8104b36 37subroutine C8104c(jvar)38 integer :: jvar(10, 3:*)39 !ERROR: A namelist group object 'jvar' must not be assumed-size40 NAMELIST /NLIST/ jvar41end subroutine C8104c42 43module C810544 integer, private :: x45 public :: NLIST46 !ERROR: A PRIVATE namelist group object 'x' must not be in a PUBLIC namelist47 NAMELIST /NLIST/ x48 !ERROR: A PRIVATE namelist group object 'x' must not be in a PUBLIC namelist49 NAMELIST /NLIST2/ x50 public :: NLIST251end module C810552