* c-c++-common/ubsan/align-7.c: Skip for -flto -fno-fat-lto-objects.
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / div-by-zero-1.C
blob88acfa1517eb045a81bf472ccfd93ddbc176fffc
1 /* { dg-do compile } */
2 /* { dg-options "-fsanitize=integer-divide-by-zero -w" } */
4 void
5 foo (int i)
7   switch (i)
8   case 0 * (1 / 0): /* { dg-error "is not a constant expression" } */
9     ;