blob: 3f32d75704354c4812f0adf3cb4d5331853b05cc [file] [log] [blame]
Anders Carlssonabea9512011-02-28 00:40:07 +00001// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm-only %s
Benjamin Kramer92b9bd92010-05-23 20:00:44 +00002
Benjamin Kramer89cf2e32010-05-23 20:57:46 +00003// PR5863
Benjamin Kramer92b9bd92010-05-23 20:00:44 +00004class E { };
5
6void P1() {
7 try {
8 int a=0, b=0;
9 if (a > b) // simply filling in 0 or 1 doesn't trigger the assertion
10 throw E(); // commenting out 'if' or 'throw' 'fixes' the assertion failure
11 try { } catch (...) { } // empty try/catch block needed for failure
12 } catch (...) { } // this try/catch block needed for failure
13}