Fix all tests that fail with -sanitize=return.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr37393.C
blob2f9281c9657658c0b00e02d22f9f6930903c73bb
1 // PR middle-end/37393
2 // { dg-do compile }
3 // { dg-options "-O2" }
5 struct A
7   ~A ();
8   bool foo () const;
9 };
11 extern "C"
13   extern void bar (const char *, ...) __attribute__ ((noreturn));
14   extern inline __attribute__ ((always_inline, gnu_inline, artificial)) void
15   baz (const char *fmt, ...)
16   {
17     bar (fmt, __builtin_va_arg_pack ());
18   }
21 void
22 test ()
24   A a;
25   if (a.foo ())
26     baz ("foo");