]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/asan/asan_test.C
Correct handling of variable offset minus constant in -Warray-bounds [PR100137]
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / asan / asan_test.C
1 // { dg-do run { target { { *-*-linux* i?86-*-freebsd* x86_64-*-freebsd* } && { { ! { i?86-*-linux* x86_64-*-linux* i?86-*-freebsd* x86_64-*-freebsd* } } || sse2_runtime } } } }
2 // { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
3 // { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
4 // { dg-additional-sources "asan_globals_test-wrapper.cc" }
5 // { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Werror -Wno-alloc-size-larger-than -Wno-array-bounds -Wno-stringop-overflow -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" }
6 // { dg-additional-options "-ldl" { target { ! *-*-freebsd* } } }
7 // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
8 // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
9 // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } }
10 // { dg-additional-options "-msse2" { target { i?86-*-linux* x86_64-*-linux* i?86-*-freebsd* x86_64-*-freebsd*} } }
11 // { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
12 // { dg-set-target-env-var ASAN_OPTIONS "handle_segv=2" }
13 // { dg-final { asan-gtest } }
14
15 #include "asan_test.cc"
16 #include "asan_mem_test.cc"
17 #include "asan_str_test.cc"
18 #include "asan_oob_test.cc"