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

#include <testfwk.h>

/* PR tree-optimization/66233 */

unsigned int v[8];

#ifndef __SDCC_pdk14 // Lack of memory
void
foo (void)
{
  int i;
  for (i = 0; i < 8; i++)
    v[i] = (float) i;
}
#endif

void
testTortureExecute (void)
{
#ifndef __SDCC_pdk14 // Lack of memory
  unsigned int i;
  foo ();
  for (i = 0; i < 8; i++)
    if (v[i] != i)
      ASSERT (0);
  return;
#endif
}