Anders Carlsson | abea951 | 2011-02-28 00:40:07 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm-only %s |
Benjamin Kramer | 92b9bd9 | 2010-05-23 20:00:44 +0000 | [diff] [blame] | 2 | |
Benjamin Kramer | 89cf2e3 | 2010-05-23 20:57:46 +0000 | [diff] [blame] | 3 | // PR5863 |
Benjamin Kramer | 92b9bd9 | 2010-05-23 20:00:44 +0000 | [diff] [blame] | 4 | class E { }; |
| 5 | |
| 6 | void 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 | } |