brintos

brintos / llvm-project-archived public Read only

0
0
Text · 999 B · 7b142d2 Raw
39 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2program p3  integer :: p4end5module m6  !PORTABILITY: Name 'm' declared in a module should not have the same name as the module [-Wbenign-name-clash]7  integer :: m8end9submodule(m) sm10  !PORTABILITY: Name 'sm' declared in a submodule should not have the same name as the submodule [-Wbenign-name-clash]11  integer :: sm12end13block data bd14  !PORTABILITY: Name 'bd' declared in a BLOCK DATA subprogram should not have the same name as the BLOCK DATA subprogram [-Wbenign-name-clash]15  type bd16  end type17end18module m219  type :: t20  end type21  interface22    subroutine s23      !ERROR: Module 'm2' cannot USE itself24      use m2, only: t25    end subroutine26  end interface27end module28subroutine s29  !ERROR: 's' is already declared in this scoping unit30  integer :: s31end32function f() result(res)33  integer :: res34  !ERROR: 'f' is already declared in this scoping unit35  !ERROR: The type of 'f' has already been declared36  real :: f37  res = 138end39