Debian Codegraph @

gcc/testsuite/c-c++-common/ubsan/save-expr-4.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
3
4 int x;
5
6 int
7 foo (int i, unsigned int u)
8 {
9 return (i % u) << (x / u);
10 }
11
12 int
13 bar (int i, unsigned int u)
14 {
15 return (((x % u) << (u / i)) >> x);
16 }