2015-04-22 Yury Gribov <y.gribov@samsung.com>
[official-gcc.git] / gcc / testsuite / c-c++-common / asan / user-section-1.c
blob51e2b9966d6e598ac9bfb3000b97c82bd0a2728b
1 /* { dg-do compile } */
2 /* { dg-options "-fsanitize=address -fsanitize-sections=.xxx,.yyy -fdump-tree-sanopt" } */
3 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
5 int x __attribute__((section(".xxx"))) = 1;
6 int y __attribute__((section(".yyy"))) = 1;
7 int z __attribute__((section(".zzz"))) = 1;
9 /* { dg-final { scan-tree-dump "__builtin___asan_unregister_globals \\(.*, 2\\);" "sanopt" } } */
10 /* { dg-final { cleanup-tree-dump "sanopt" } } */