brintos

brintos / llvm-project-archived public Read only

0
0
Text · 816 B · 615045d Raw
39 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module explicit3  intrinsic cos4end5subroutine testExplicit6  use explicit7  !ERROR: 'cos' is use-associated from module 'explicit' and cannot be re-declared8  real :: cos = 2.9end10subroutine extendsUsedIntrinsic11  use explicit12  interface cos13    pure real function mycos(x)14      real, intent(in) :: x15    end16  end interface17end18subroutine sameIntrinsic119  use explicit20  !WARNING: Use-associated 'cos' already has 'INTRINSIC' attribute [-Wredundant-attribute]21  intrinsic cos22  real :: one = cos(0.)23end24module renamer25  use explicit, renamedCos => cos26end27subroutine sameIntrinsic228  use explicit29  use renamer, cos => renamedCos30  real :: one = cos(0.)31end32module implicit33  real :: one = cos(0.)34end35subroutine testImplicit36  use implicit37  real :: cos = 2.38end39