|
1 | | -! Verify that the frontend driver error-out if multiple actions are specified |
2 | | - |
3 | | -! RUN: not %flang_fc1 -E -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR |
4 | | -! RUN: not %flang_fc1 -fsyntax-only -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR |
5 | | - |
6 | | -! ERROR: error: Only one action option is allowed |
7 | | - |
8 | | -end progream |
| 1 | +! Verify that the frontend driver raises the expected error when multiple |
| 2 | +! actions are specified. |
| 3 | +! |
| 4 | +! RUN: not %flang_fc1 -fsyntax-only -fsyntax-only %s 2>&1 \ |
| 5 | +! RUN: | FileCheck %s --check-prefixes=ERROR,ACTIONS-1 |
| 6 | +! |
| 7 | +! RUN: not %flang_fc1 -E -fsyntax-only %s 2>&1 \ |
| 8 | +! RUN: | FileCheck %s --check-prefixes=ERROR,ACTIONS-2 |
| 9 | +! |
| 10 | +! RUN: not %flang_fc1 -fsyntax-only -E -emit-llvm %s 2>&1 \ |
| 11 | +! RUN: | FileCheck %s --check-prefixes=ERROR,ACTIONS-3 |
| 12 | +! |
| 13 | +! If one or more options are specified with -Xflang, they will appear last in |
| 14 | +! the error message. |
| 15 | +! |
| 16 | +! RUN: not %flang -S -Xflang -emit-llvm %s 2>&1 \ |
| 17 | +! RUN: | FileCheck %s --check-prefixes=ERROR,ACTIONS-4 |
| 18 | +! |
| 19 | +! RUN: not %flang -Xflang -emit-llvm -S %s 2>&1 \ |
| 20 | +! RUN: | FileCheck %s --check-prefixes=ERROR,ACTIONS-4 |
| 21 | +! |
| 22 | +! RUN: not %flang -Xflang -emit-obj -S -Xflang -emit-llvm %s 2>&1 \ |
| 23 | +! RUN: | FileCheck %s --check-prefixes=ERROR,ACTIONS-5 |
| 24 | +! |
| 25 | +! ERROR: error: only one action option is allowed. |
| 26 | +! ACTIONS-1: Got '-fsyntax-only', '-fsyntax-only' |
| 27 | +! ACTIONS-2: Got '-E', '-fsyntax-only' |
| 28 | +! ACTIONS-3: Got '-fsyntax-only', '-E', '-emit-llvm' |
| 29 | +! ACTIONS-4: Got '-S', '-emit-llvm' |
| 30 | +! ACTIONS-5: Got '-S', '-emit-obj', '-emit-llvm' |
0 commit comments