1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm-only %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc // PR5863 4*f4a2713aSLionel Sambuc class E { }; 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc void P1() { 7*f4a2713aSLionel Sambuc try { 8*f4a2713aSLionel Sambuc int a=0, b=0; 9*f4a2713aSLionel Sambuc if (a > b) // simply filling in 0 or 1 doesn't trigger the assertion 10*f4a2713aSLionel Sambuc throw E(); // commenting out 'if' or 'throw' 'fixes' the assertion failure 11*f4a2713aSLionel Sambuc try { } catch (...) { } // empty try/catch block needed for failure 12*f4a2713aSLionel Sambuc } catch (...) { } // this try/catch block needed for failure 13*f4a2713aSLionel Sambuc } 14