Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr64280.C

raw
1 // { dg-do compile }
2
3 class A
4 {
5 public:
6 A ();
7 };
8 class B
9 {
10 public:
11 B (int);
12 operator void *() { return m_fn1 () ? 0 : this; }
13 int m_fn1 ();
14 };
15 typedef int jmp_buf[];
16 struct C
17 {
18 jmp_buf cond_;
19 };
20 class F
21 {
22 C what_;
23 bool m_fn2 ();
24 };
25 int _setjmp (int[]);
26 void longjmp ();
27 class D
28 {
29 public:
30 D () { longjmp (); }
31 };
32 bool
33 F::m_fn2 ()
34 {
35 B a (0);
36 if (a)
37 if (_setjmp (what_.cond_))
38 return 0;
39 else
40 D ();
41 A b;
42 } // { dg-warning "control reaches end of non-void function" }