brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · b6aa44a Raw
35 lines · plain
1! Test the default setting. Emit warnings only.2! RUN: %flang -c %s 2>&1 | FileCheck %s -check-prefix=DEFAULT3 4! Test that the warnings are not generated with `-w` option.5! RUN: %flang -c -w %s 2>&1 | FileCheck --allow-empty %s -check-prefix=WARNING6 7! Test that the warnings are not generated with `--no-warnings` option.8! RUN: %flang -c --no-warnings %s 2>&1 | FileCheck --allow-empty %s -check-prefix=WARNING9 10! Test that warnings are portability messages are generated.11! RUN: %flang -c -pedantic %s 2>&1 | FileCheck %s -check-prefixes=DEFAULT,PORTABILITY12 13! Test that warnings and portability messages are not generated.14! TODO: Support the last flag wins behaviour.15! RUN: %flang -c -pedantic -w %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=WARNING,PORTABILITY-WARNING16! RUN: %flang -c -w -pedantic %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=WARNING,PORTABILITY-WARNING17! DEFAULT: warning: Label '40' is in a construct that should not be used as a branch target here18! DEFAULT: warning: Label '50' is in a construct that should not be used as a branch target here19! WARNING-NOT: warning20! PORTABILITY: portability: Statement function 'sf1' should not contain an array constructor21! PORTABILITY-WARNING-NOT: portability22 23subroutine sub01(n)24  integer n25  GOTO (40,50,60) n26  if (n .eq. 1) then2740   print *, "xyz"2850 end if2960 continue30end subroutine sub0131 32subroutine sub0233  sf1(n) = sum([(j,j=1,n)])34end subroutine sub0235