summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr80350.c
blob: 317d2facaf7a8fb4f7150715da7f6fcfa6fed880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR target/80310 */
/* { dg-do run } */
/* { dg-options "-O0 -fsanitize=shift -fno-sanitize-recover=shift" } */

unsigned int x = 1;
unsigned int y = 0;

void foo() {
  y = 1 >> (!x * 1111);
}

int main () {
    foo ();
    if (y != 1)
      __builtin_abort ();
    return 0;
}