aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr117363-2.c
blob: f608380e62fb66ec65208ce78ac7757510487921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */

/* PR tree-optimization/117363 */
/* ldist produces `s != 0 ? s - 1 : 0`  (with casts) and that
   the match pattern which messed up the converts. */

void f(int *array, long t) {
  if (!t) return;
  unsigned long s = ~t;
  for (long i = 0; i < s; i++)
    array[i] = 0;
}