summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/asan/user-section-2.c
blob: 0c035c37952993047cb73506c477193c9a95fcf1 (plain)
1
2
3
4
5
6
7
8
9
10
/* { dg-do compile } */
/* { dg-options "-fsanitize=address -fsanitize-sections=.x* -fdump-tree-sanopt" } */
/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */

int x __attribute__((section(".x1"))) = 1;
int y __attribute__((section(".x2"))) = 1;
int z __attribute__((section(".x3"))) = 1;

/* { dg-final { scan-tree-dump "__builtin___asan_unregister_globals \\(.*, 3\\);" "sanopt" } } */