Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
div-by-zero-1.C
blob: 11ed7ec08930caa4c625725d9abefa0f032dfb21 [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-fsanitize=integer-divide-by-zero" } */
void
foo
(
int
i
)
{
switch
(
i
)
case
0
*
(
1
/
0
):
/* { dg-warning "division by zero" } */
;
/* { dg-error "is not a constant.expression" "" { target *-*-* } .-1 } */
}