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
/
pr71512.C
blob
9822c989a1cf92d2d8ab49f8bcd8055bcc6a0d9b
1
/* PR c/71512 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -ftrapv -fnon-call-exceptions -fsanitize=undefined" } */
4
5
bool
6
foo (int *x, int *y, int *z)
7
{
8
try
9
{
10
x[0] = y[0] + z[0];
11
x[1] = y[1] - z[1];
12
x[2] = y[2] * z[2];
13
x[3] = -y[3];
14
}
15
catch (...)
16
{
17
return true;
18
}
19
return false;
20
}