xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/fold-const-declref.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify -emit-llvm-only %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // PR7242: Check that this doesn't crash.
main(void)4*f4a2713aSLionel Sambuc int main(void)
5*f4a2713aSLionel Sambuc {
6*f4a2713aSLionel Sambuc   int __negative = 1;
7*f4a2713aSLionel Sambuc   const int __max = __negative && 0 ;
8*f4a2713aSLionel Sambuc   __max / 0;  // expected-warning{{expression result unused}} expected-warning{{division by zero is undefined}}
9*f4a2713aSLionel Sambuc }
10