|
1 |
| -! RUN: %flang -c %s 2>&1 | FileCheck %s |
2 |
| -! RUN: %flang -c -w %s 2>&1 | FileCheck --allow-empty %s -check-prefix=CHECK-W |
3 |
| -! RUN: %flang -c -pedantic %s 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-PORT |
4 |
| -! RUN: %flang -c -pedantic -w %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=CHECK-W,CHECK-PORT-W |
5 |
| -! RUN: %flang -c -w -pedantic %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=CHECK-W,CHECK-PORT-W |
6 |
| -! CHECK: warning: Label '40' is in a construct that should not be used as a branch target here |
7 |
| -! CHECK: warning: Label '50' is in a construct that should not be used as a branch target here |
8 |
| -! CHECK-W-NOT: warning |
9 |
| -! CHECK-PORT: portability: Statement function 'sf1' should not contain an array constructor |
10 |
| -! CHECK-PORT-W-NOT: portability |
| 1 | +! Test the default setting. Emit warnings only. |
| 2 | +! RUN: %flang -c %s 2>&1 | FileCheck %s -check-prefix=DEFAULT |
| 3 | + |
| 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 |
| 6 | + |
| 7 | +! Test that warnings are portability messages are generated. |
| 8 | +! RUN: %flang -c -pedantic %s 2>&1 | FileCheck %s -check-prefixes=DEFAULT,PORTABILITY |
| 9 | + |
| 10 | +! Test that warnings and portability messages are not generated. |
| 11 | +! TODO: Support the last flag wins behaviour. |
| 12 | +! RUN: %flang -c -pedantic -w %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=WARNING,PORTABILITY-WARNING |
| 13 | +! RUN: %flang -c -w -pedantic %s 2>&1 | FileCheck --allow-empty %s -check-prefixes=WARNING,PORTABILITY-WARNING |
| 14 | +! DEFAULT: warning: Label '40' is in a construct that should not be used as a branch target here |
| 15 | +! DEFAULT: warning: Label '50' is in a construct that should not be used as a branch target here |
| 16 | +! WARNING-NOT: warning |
| 17 | +! PORTABILITY: portability: Statement function 'sf1' should not contain an array constructor |
| 18 | +! PORTABILITY-WARNING-NOT: portability |
11 | 19 |
|
12 | 20 | subroutine sub01(n)
|
13 | 21 | integer n
|
|
0 commit comments