Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gcc.dg / lto / chkp-static-bounds_0.c
blob596e5510664f9d5105b1950cff6ef79b71c28eec
1 /* { dg-lto-do link } */
2 /* { dg-require-effective-target mpx } */
3 /* { dg-lto-options { { -flto -flto-partition=max -fcheck-pointer-bounds -mmpx } } } */
5 const char *cc;
7 int test1 (const char *c)
9 c = __builtin___bnd_init_ptr_bounds (c);
10 cc = c;
11 return c[0] * 2;
14 struct S
16 int (*fnptr) (const char *);
17 } S;
19 struct S s1 = {test1};
20 struct S s2 = {test1};
21 struct S s3 = {test1};
23 int main (int argc, const char **argv)
25 return s1.fnptr (argv[0]) + s2.fnptr (argv[1]);