aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr92324-3.c
blob: db5c399d4ff3596950ec8319050f577fa269b220 (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
#include "tree-vect.h"

int a[1024];
unsigned b[1024];

int __attribute__((noipa))
foo (int n)
{
  int res = 0;
  for (int i = 0; i < n; ++i)
    {
      res = res > a[i] ? res : a[i];
      res = res > b[i] ? res : b[i];
    }
  return res;
}

int main ()
{
  check_vect ();
  b[3] = (unsigned)__INT_MAX__ + 1;
  if (foo (4) != -__INT_MAX__ - 1)
    __builtin_abort ();
  return 0;
}

/* { dg-final { scan-tree-dump-not "vectorized \[1-9\] loops" "vect" } } */