]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/asan/no-redundant-odr-indicators-1.c
Add support for ASan odr_indicator.
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / asan / no-redundant-odr-indicators-1.c
1 /* { dg-do compile } */
2 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
3
4 /* Local variables should not have odr indicators. */
5 static int a = 2;
6 /* Thread local variables should not have odr indicators. */
7 __thread int b = 3;
8 /* Externally visible variables should have odr indicators. */
9 int c = 1;
10
11 int main () {
12 return 0;
13 }
14
15 /* { dg-final { scan-assembler-not "odr_asan\[\.\$\]a" } } */
16 /* { dg-final { scan-assembler-not "odr_asan\[\.\$\]b" } } */
17 /* { dg-final { scan-assembler "odr_asan\[\.\$\]c" } } */