[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51644.c
blob2038a0c4b930481a3fa980aac3ec9363e064bc73
1 /* PR middle-end/51644 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wall -fexceptions" } */
5 #include <stdarg.h>
7 extern void baz (int, va_list) __attribute__ ((__noreturn__));
9 __attribute__ ((__noreturn__))
10 void
11 foo (int s, ...)
13 va_list ap;
14 va_start (ap, s);
15 baz (s, ap);
16 va_end (ap);
17 } /* { dg-bogus "function does return" } */
19 __attribute__ ((__noreturn__))
20 void
21 bar (int s, ...)
23 va_list ap1;
24 va_start (ap1, s);
26 va_list ap2;
27 va_start (ap2, s);
28 baz (s, ap1);
29 baz (s, ap2);
30 va_end (ap2);
32 va_end (ap1);
33 } /* { dg-bogus "function does return" } */