xref: /llvm-project/clang/test/CodeGen/fold-const-declref.c (revision c05ecd5b178c66a4f35e360c676579225e6e73b9)
1*c05ecd5bSNico Weber // RUN: %clang_cc1 -verify -emit-llvm-only %s
20b1fbd13SEli Friedman 
30b1fbd13SEli Friedman // PR7242: Check that this doesn't crash.
main(void)40b1fbd13SEli Friedman int main(void)
50b1fbd13SEli Friedman {
60b1fbd13SEli Friedman   int __negative = 1;
70b1fbd13SEli Friedman   const int __max = __negative && 0 ;
8*c05ecd5bSNico Weber   __max / 0;  // expected-warning{{expression result unused}} expected-warning{{division by zero is undefined}}
90b1fbd13SEli Friedman }
10