aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60196-2.c
blob: b2059c20cd55119e0c91a085f84320ed278c43da (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
33
/* PR tree-optimization/63189 */
/* { dg-do run } */

#include "tree-vect.h"

static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };

__attribute__((noinline, noclone)) static int
bar (void)
{
  int sum = 0, i;
  for (i = 0; i < 8; ++i)
    sum += a[i] * b[i];
  return sum;
}

__attribute__((noinline, noclone)) void
foo (void)
{
  if (bar () != 0)
    abort ();
}

int
main ()
{
  check_vect ();
  foo ();
  return 0;
}

/* { dg-final { cleanup-tree-dump "vect" } } */