repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
div-by-zero-1.C
blob
11ed7ec08930caa4c625725d9abefa0f032dfb21
1
/* { dg-do compile } */
2
/* { dg-options "-fsanitize=integer-divide-by-zero" } */
3
4
void
5
foo (int i)
6
{
7
switch (i)
8
case 0 * (1 / 0): /* { dg-warning "division by zero" } */
9
; /* { dg-error "is not a constant.expression" "" { target *-*-* } .-1 } */
10
}