summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr91720.c
blob: 4abdace94da1f2288448a42373b360f4f28e72cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR rtl-optimization/91720 */
/* { dg-do run } */
/* { dg-options "-Og -fno-forward-propagate -frerun-cse-after-loop -fno-tree-fre" } */

unsigned a, b;

int
main ()
{
#if __CHAR_BIT__ == 8
  unsigned c = 1;
  unsigned long long d = 0;
  unsigned char e = 0;
  e = __builtin_sub_overflow (d, e, &a) ? 0 : 0x80;
  e = e << 7 | e >> c;
  __builtin_memmove (&d, &a, 2);
  b = e;
  if (b != 0x40)
    __builtin_abort ();
#endif
  return 0;
}