PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / lto / chkp-removed-alias_0.c
blob96d728d5122a26478d28616f811e350020df9138
1 /* { dg-lto-do link } */
2 /* { dg-require-effective-target mpx } */
3 /* { dg-lto-options { { -O2 -flto -flto-partition=max -fcheck-pointer-bounds -mmpx } } } */
5 int test1 (const char *c)
7 return c[0] * 2;
10 int test2 (const char *c)
12 return c[1] * 3;
15 int test1_alias (const char *c) __attribute__ ((alias ("test1")));
16 int test2_alias (const char *c) __attribute__ ((alias ("test2")));
18 struct S
20 int (*fnptr[2]) (const char *);
21 } S;
23 struct S s = {test1_alias, test2_alias};
25 int main (int argc, const char **argv)
27 return s.fnptr[argc] (argv[0]);