1 /* PR middle-end/51644 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wall -fexceptions" } */
4
5 #include <stdarg.h>
6
7 extern void baz (int, va_list) __attribute__ ((__noreturn__));
8
9 __attribute__ ((__noreturn__))
10 void
foo(int s,...)11 foo (int s, ...)
12 {
13 va_list ap;
14 va_start (ap, s);
15 baz (s, ap);
16 va_end (ap);
17 } /* { dg-bogus "function does return" } */
18
19 __attribute__ ((__noreturn__))
20 void
bar(int s,...)21 bar (int s, ...)
22 {
23 va_list ap1;
24 va_start (ap1, s);
25 {
26 va_list ap2;
27 va_start (ap2, s);
28 baz (s, ap1);
29 baz (s, ap2);
30 va_end (ap2);
31 }
32 va_end (ap1);
33 } /* { dg-bogus "function does return" } */
34