P1236R1 - Signed integers are two's complement
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / cxx2a-shift-1.C
blob2094cb1b6b4f40c76793f05cce55d807689d157d
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=shift -w -fno-sanitize-recover=shift -std=c++2a" } */
4 int
5 main ()
7   int a = 1;
8   a <<= 31;
9   a = 16;
10   a <<= (__SIZEOF_INT__ * __CHAR_BIT__ - 5);