blob: 256181fa655fd72bcb4950bdb628d110ce0650e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// PR tree-optimization/39259
// { dg-do compile }
// { dg-options "-O2" }
extern "C" int __mysetjmp () __attribute__ ((__returns_twice__));
class TContStatus {};
class TContEvent
{
public:
inline void Execute () throw();
};
class TCont
{
public:
TContStatus ReadD (void* buf, int deadline)
{
TContEvent event;
event.Execute ();
return TContStatus();
}
TContStatus ReadI (void *buf)
{
return ReadD (buf, 1);
}
};
void TContEvent::Execute () throw ()
{
__mysetjmp();
}
void Broken (TCont *mCont)
{
mCont->ReadI(0);
mCont->ReadI(0);
}
|