summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arc/loop-hazard-1.c
blob: 7c688bbc236a57aa049ed544de52f7eb81c4f674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-Os" } */

/* This caused an assertion within arc_loop_hazard.  */

unsigned a, b;

long fn1()
{
  long c = 1, d = 0;
  while (a && c && b)
    c <<= 1;
  while (c)
    d |= c;
  return d;
}