summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr78445.c
blob: bb5327b9f705b83b305618feacdcf60f3544ccbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR tree-optimization/78445 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-loop-if-convert -ftree-vectorize" } */
/* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */

int a;

void
foo (int x, int *y)
{
  while (a != 0)
    if (x != 0)
      {
	*y = a;
	x = *y;
      }
    else
      x = a;
}