Debian Codegraph @

gcc/testsuite/gcc.dg/pr51644.c

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