blob: ac4095bf0120bd0b66b0c61abe58cd37839e2a39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* { dg-lto-do run } */
/* { dg-require-effective-target mpx } */
/* { dg-lto-options { { -O2 -flto -fcheck-pointer-bounds -mmpx -nodefaultlibs -lc } } } */
int glob = 1;
void __attribute__((constructor))
ctor1 ()
{
glob += 1;
}
void __attribute__((constructor))
ctor2 ()
{
glob -= 2;
}
int main (int argc, const char **argv)
{
return glob;
}
|