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