aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr80932.c
blob: 3ee56c80740e490717f3280e039cc0a362190679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR sanitizer/80932 */
/* { dg-do run } */
/* { dg-options "-fsanitize=undefined -fno-sanitize-trap=all -fsanitize-trap=shift,undefined" } */

int x = 1;

int
foo (void)
{
  return ((int) (2855545792U * x) - (int) (3269399503U * x)) * -5;
}

int
main ()
{
  foo ();
}