aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr81097.c
blob: cd323ea2acbc903a2ca074847fa78f0db081edb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do run } */
/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */

unsigned int a = 3309568;
unsigned int b = -1204857327;
short c = -10871;
short x;
int main()
{
  x = ((short)(~a) | ~c) +  ((short)(~b) | ~c);
  return 0;
}