Hans Wennborg | c9bd88e | 2014-01-14 19:35:09 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -emit-llvm-only %s |
Benjamin Kramer | 11d4d9e | 2010-05-23 20:00:44 +0000 | [diff] [blame] | 2 | |
Benjamin Kramer | dc99965 | 2010-05-23 20:57:46 +0000 | [diff] [blame] | 3 | // PR5863 |
Benjamin Kramer | 11d4d9e | 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 | } |