brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 4a93454 Raw
29 lines · c
1/// When -fwrapv (implied by -fno-strict-overflow) is enabled,2/// -fsanitize=undefined does not expand to signed-integer-overflow.3/// -fsanitize=signed-integer-overflow is unaffected by -fwrapv.4 5// RUN: %clang -### --target=x86_64-linux -fwrapv -fsanitize=signed-integer-overflow %s 2>&1 | FileCheck %s6// CHECK: -fsanitize=signed-integer-overflow7// CHECK: -fsanitize-recover=signed-integer-overflow8 9// RUN: %clang -### --target=x86_64-linux -fno-strict-overflow -fsanitize=undefined %s 2>&1 | FileCheck %s --check-prefix=EXCLUDE10// RUN: %clang -### --target=x86_64-linux -fstrict-overflow -fwrapv -fsanitize=undefined %s 2>&1 | FileCheck %s --check-prefix=EXCLUDE11// EXCLUDE:     -fsanitize=alignment,array-bounds,12// EXCLUDE-NOT: signed-integer-overflow,13// EXCLUDE:      -fsanitize-recover=alignment,array-bounds,14// EXCLUDE-SAME: signed-integer-overflow15 16// RUN: %clang -### --target=x86_64-linux -fwrapv -fsanitize=undefined -fsanitize=signed-integer-overflow %s 2>&1 | FileCheck %s --check-prefix=INCLUDE17// RUN: %clang -### --target=x86_64-linux -fno-strict-overflow -fno-sanitize=signed-integer-overflow -fsanitize=undefined -fsanitize=signed-integer-overflow %s 2>&1 | FileCheck %s --check-prefix=INCLUDE18// INCLUDE:      -fsanitize=alignment,array-bounds,19// INCLUDE-SAME: signed-integer-overflow20// INCLUDE:      -fsanitize-recover=alignment,array-bounds,21// INCLUDE-SAME: signed-integer-overflow22 23/// -fsanitize-trap=undefined expands to signed-integer-overflow regardless of -fwrapv.24// RUN: %clang -### --target=x86_64-linux -fwrapv -fsanitize=undefined -fsanitize=signed-integer-overflow -fsanitize-trap=undefined %s 2>&1 | FileCheck %s --check-prefix=INCLUDE-TRAP25// INCLUDE-TRAP:      -fsanitize=alignment,array-bounds,26// INCLUDE-TRAP-SAME: signed-integer-overflow27// INCLUDE-TRAP:      -fsanitize-trap=alignment,array-bounds,28// INCLUDE-TRAP-SAME: signed-integer-overflow29