For each R_Group diagnostic produced, this patch gives more information about it by printing the absolute file path, the line and column number the pass was applied to and finally the remark option that was used. Clang does the same with the exception of printing the relative path rather than absolute path. Depends on D159260. That patch adds support for backend passes while this patch adds remark options to the backend test cases. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D159258
20 lines
843 B
Fortran
20 lines
843 B
Fortran
! This file tests invalid usage of the -Rpass family of flags (-Rpass, -Rpass-missed
|
|
! and -Rpass-analysis)
|
|
! loop-delete isn't enabled at O0 so we use at least O1
|
|
|
|
! Check error on invalid regex -Rpass message is emitted
|
|
! RUN: not %flang %s -O1 -Rpass=[ -c 2>&1 | FileCheck %s --check-prefix=REGEX-INVALID
|
|
|
|
! Check "unknown remark option" warning
|
|
! RUN: %flang %s -O1 -R -c 2>&1 | FileCheck %s --check-prefix=WARN
|
|
|
|
! Check "unknown remark option" warning with suggestion
|
|
! RUN: %flang %s -O1 -Rpas -c 2>&1 | FileCheck %s --check-prefix=WARN-SUGGEST
|
|
|
|
! REGEX-INVALID: error: in pattern '-Rpass=[': brackets ([ ]) not balanced
|
|
! WARN: warning: unknown remark option '-R' [-Wunknown-warning-option]
|
|
! WARN-SUGGEST: warning: unknown remark option '-Rpas'; did you mean '-Rpass'? [-Wunknown-warning-option]
|
|
|
|
program forttest
|
|
end program forttest
|