Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr101145inf_1.c

raw
1 /* { dg-require-effective-target alarm } */
2 /* { dg-require-effective-target signal } */
3 /* { dg-additional-options "-O3" } */
4 #include <limits.h>
5 #include "pr101145inf.inc"
6
7 __attribute__ ((noinline))
8 unsigned foo(unsigned val, unsigned start)
9 {
10 unsigned cnt = 0;
11 for (unsigned i = start; i < val; i-=16)
12 cnt++;
13 return cnt;
14 }
15
16 void test_finite ()
17 {
18 foo (UINT_MAX - 15, 32);
19 }
20
21 void test_infinite ()
22 {
23 foo (UINT_MAX - 14, 32);
24 }