1 ! Test the default setting. Emit warnings only.
2 ! RUN: %flang -c %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
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=WARNING
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=WARNING
10 ! Test that warnings are portability messages are generated.
11 ! RUN: %flang -c -pedantic %s 2>&1 | FileCheck %s -check-prefixes=DEFAULT,PORTABILITY
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-WARNING
16 ! RUN: %flang -c -w -pedantic %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=WARNING,PORTABILITY-WARNING
17 ! DEFAULT: warning: Label '40' is in a construct that should not be used as a branch target here
18 ! DEFAULT: warning: Label '50' is in a construct that should not be used as a branch target here
19 ! WARNING-NOT: warning
20 ! PORTABILITY: portability: Statement function 'sf1' should not contain an array constructor
21 ! PORTABILITY-WARNING-NOT: portability
33 sf1(n
) = sum([(j
,j
=1,n
)])