Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / c-c++-common / ubsan / shift-3.c
blob65ee5d8821e06adeded76a99492040c712d21fe1
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=shift -w" } */
4 #include <stdio.h>
6 int
7 main (void)
9 fputs ("UBSAN TEST START\n", stderr);
11 unsigned int a = 1;
12 a <<= 31;
13 a <<= 1;
15 fputs ("UBSAN TEST END\n", stderr);
16 return 0;
19 /* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */