diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ubsan/pr81505.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ubsan/pr81505.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ubsan/pr81505.c b/gcc/testsuite/gcc.dg/ubsan/pr81505.c new file mode 100644 index 00000000000..1cebef56172 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ubsan/pr81505.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fsanitize=signed-integer-overflow" } */ + +int a, b, c, h; + +int i[5][5]; + +void +fn1 () +{ + int l = 0; + + for (a = 0; a <= 3; a++) + for (b = 1; b >= 0; b -= 1) + l |= i[0][b]; + c = l; +} |