summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-loop-14.c
blob: b23060f8acfbb1e3301ec1df4f8c7052bc61ba5e (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
/*
   loop-14.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

int a3[3];

void f(int *a)
{
  int i;

  for (i=3; --i;)
    a[i] = 42 / i;
}

void
testTortureExecute (void)
{
  f(a3);

  if (a3[1] != 42 || a3[2] != 21)
    ASSERT (0);

  return;
}