Merged revisions 143552,143554,143557,143560,143562,143564-143567,143570-143573,14357...
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr39259.C
blob256181fa655fd72bcb4950bdb628d110ce0650e3
1 // PR tree-optimization/39259
2 // { dg-do compile }
3 // { dg-options "-O2" }
6 extern "C" int __mysetjmp () __attribute__ ((__returns_twice__));
8 class TContStatus {};
10 class TContEvent
12 public:
13   inline void Execute () throw();
16 class TCont
18 public:
19   TContStatus ReadD (void* buf, int deadline)
20   {
21     TContEvent event;
22     event.Execute ();
23     return TContStatus();
24   }
25   TContStatus ReadI (void *buf)
26   {
27     return ReadD (buf, 1);
28   }
31 void TContEvent::Execute () throw ()
33   __mysetjmp();
36 void Broken (TCont *mCont)
38   mCont->ReadI(0);
39   mCont->ReadI(0);