blob: f49611cda79ae3b55c8a6924101b9dffab184c11 [file] [log] [blame]
Nico Weberdc32de22012-09-26 09:09:17 +00001// RUN: %clang_cc1 -verify -emit-llvm-only %s
Eli Friedmana7dedf72010-09-06 00:10:32 +00002
3// PR7242: Check that this doesn't crash.
4int main(void)
5{
6 int __negative = 1;
7 const int __max = __negative && 0 ;
Nico Weberdc32de22012-09-26 09:09:17 +00008 __max / 0; // expected-warning{{expression result unused}} expected-warning{{division by zero is undefined}}
Eli Friedmana7dedf72010-09-06 00:10:32 +00009}