brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 7f5067e Raw
93 lines · plain
1! RUN: not %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s2! CHECK: Label '50' was not found3! CHECK: warning: Label '55' is in a construct that should not be used as a branch target here4! CHECK: Label '70' is not a branch target5! CHECK: Control flow use of '70'6! CHECK: error: Label '80' is in a construct that prevents its use as a branch target here7! CHECK: error: Label '90' is in a construct that prevents its use as a branch target here8! CHECK: error: Label '91' is in a construct that prevents its use as a branch target here9! CHECK: error: Label '92' is in a construct that prevents its use as a branch target here10! CHECK: error: Label '30' is in a construct that prevents its use as a branch target here11! CHECK: error: Label '31' is in a construct that prevents its use as a branch target here12! CHECK-NOT: error: Label '32' is in a construct that prevents its use as a branch target here13! CHECK: error: Label '40' is in a construct that prevents its use as a branch target here14! CHECK: error: Label '41' is in a construct that prevents its use as a branch target here15! CHECK-NOT: error: Label '42' is in a construct that prevents its use as a branch target here16 17subroutine sub00(a,b,n,m)18  real a(n,m)19  real b(n,m)20  if (n .ne. m) then21     goto 5022  end if236 n = m24end subroutine sub0025 26subroutine sub01(a,b,n,m)27  real a(n,m)28  real b(n,m)29  if (n .ne. m) then30     goto 5531  else3255   continue33  end if3460 n = m35end subroutine sub0136 37subroutine sub02(a,b,n,m)38  real a(n,m)39  real b(n,m)40  if (n .ne. m) then41     goto 7042  else43     return44  end if4570 FORMAT (1x,i6)46end subroutine sub0247 48subroutine sub03(a,n)49  real a(n)50  forall (j=1:n)5180  a(n) = j52  end forall53  go to 8054end subroutine sub0355 56subroutine sub04(a,n)57  real a(n)58  where (a > 0)5990  a = 160  elsewhere (a < 0)6191  a = 262  elsewhere6392  a = 364  end where65  if (n - 3) 90, 91, 9266end subroutine sub0467 68subroutine sub05(a)69  real a(..)70  select rank (a)71  rank(1)7231  goto 3073  rank(2)74    goto 327532  continue7630  continue77  end select78  goto 3179end80 81subroutine sub06(a)82  class(*) a83  select type (a)84  type is (integer)8541  goto 4086  type is (real)87    goto 428842  continue8940  continue90  end select91  goto 4192end93