2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr63995-2.c
blob7c22e625a8d4e1f83ce4c34603c834db8b7e8700
1 /* { dg-do compile } */
2 /* { dg-require-effective-target mpx } */
3 /* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx -fcompare-debug" } */
5 struct ts
7 int field;
8 };
10 extern void test1 ();
11 extern void test2 (struct ts *);
13 static void
14 init (struct ts *c)
16 c->field = -1;
19 struct ts
20 test3 (const struct ts *other)
22 struct ts r;
23 if (other->field != 0)
24 test1 ();
25 init (&r);
26 test2 (&r);
27 return r;