Nico Weber | dc32de2 | 2012-09-26 09:09:17 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify -emit-llvm-only %s |
Eli Friedman | a7dedf7 | 2010-09-06 00:10:32 +0000 | [diff] [blame] | 2 | |
| 3 | // PR7242: Check that this doesn't crash. |
| 4 | int main(void) |
| 5 | { |
| 6 | int __negative = 1; |
| 7 | const int __max = __negative && 0 ; |
Nico Weber | dc32de2 | 2012-09-26 09:09:17 +0000 | [diff] [blame] | 8 | __max / 0; // expected-warning{{expression result unused}} expected-warning{{division by zero is undefined}} |
Eli Friedman | a7dedf7 | 2010-09-06 00:10:32 +0000 | [diff] [blame] | 9 | } |