2 /* { dg-do compile { target { { lp64 || ilp32 } || llp64 } } } */
3 /* { dg-options "-O2 -Wdiv-by-zero" } */
8 return 1 / (sizeof (char) - 1); /* { dg-warning "division by zero" } */
14 const int x
= sizeof (char) - 1;
15 return 1 / x
; /* { dg-warning "division by zero" "" { target c++ } } */
21 return 1 / (sizeof (int) / 3 - 1); /* { dg-warning "division by zero" } */
27 const int x
= sizeof (int) / 3 - 1;
28 return 1 / x
; /* { dg-warning "division by zero" "" { target c++ } } */