summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/sms-13.c
blob: cd7bb62006ce0424e8f94d19d1bee2cdf9eaaf5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* PR target/83507 */
/* { dg-do compile } */
/* { dg-options "-O2 -fmodulo-sched -fno-tree-ter -fno-tree-coalesce-vars" } */

void
foo (unsigned short int x, unsigned char y)
{
  unsigned char *a = &y;
  unsigned short int b;
  int c;

  while (y < 3)
    {
      if (x != 0)
        ++y;
      ++y;
    }

  for (c = 0; c < 5; ++c)
    {
      int d = 1;
      d += b > x;
      y &= d;
    }

  do
    {
      c += y;
      x = c;
    }
  while (x != 0);
}