aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/ubsan/shift-4.c
blob: 5f095b61ac8b7096d70205f3174a1cbb8eae3131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do run } */
/* { dg-options "-fsanitize=shift -w" } */

struct S { unsigned long long int b:40; } s;

int
main ()
{
  s.b = 2;
  s.b <<= 120;
  return 0;
}

/* { dg-output "shift exponent 120 is too large\[^\n\r]*" } */