xref: /llvm-project/flang/test/Driver/optimization-remark-invalid.f90 (revision 12da8ef0e318cf1e05c1380de7b98bc5cfa51f42)
1! This file tests invalid usage of the -Rpass family of flags (-Rpass, -Rpass-missed
2! and -Rpass-analysis)
3! loop-delete isn't enabled at O0 so we use at least O1
4
5! Check error on invalid regex -Rpass message is emitted
6! RUN: not %flang %s -O1 -Rpass=[ -c 2>&1 | FileCheck %s --check-prefix=REGEX-INVALID
7
8! Check "unknown remark option" warning
9! RUN: %flang %s -O1 -R -c 2>&1 | FileCheck %s --check-prefix=WARN
10
11! Check "unknown remark option" warning with suggestion
12! RUN: %flang %s -O1 -Rpas -c 2>&1 | FileCheck %s --check-prefix=WARN-SUGGEST
13
14! REGEX-INVALID: error: in pattern '-Rpass=[': brackets ([ ]) not balanced
15! WARN: warning: unknown remark option '-R' [-Wunknown-warning-option]
16! WARN-SUGGEST: warning: unknown remark option '-Rpas'; did you mean '-Rpass'? [-Wunknown-warning-option]
17
18program forttest
19end program forttest
20