Merge from trunk
[official-gcc.git] / gcc / testsuite / c-c++-common / ubsan / undefined-1.c
blob1229b711fe92147a3ac484bb714e730ec5be77d9
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=undefined" } */
3 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
5 int
6 foo (int x, int y)
8 const int z = 2;
9 if (z & 1)
10 return x << y;
11 return 0;
14 int
15 bar (int x, int y)
17 return x + y;
20 int
21 main (void)
23 foo (3, 2);
24 bar (12, 42);
25 return 0;