summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-921013-1.c
blob: 225b1aa528ff429e2176767e889cdc8eb1cc1b29 (plain) (blame)
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
/*
   921013-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#if !defined(__SDCC_pdk14) // Lack of memory
void f(int *d, float *x, float *y,int n)
{
  while(n--){*d++=*x++==*y++;}
}
#endif

void
testTortureExecute (void)
{
#if !defined(__SDCC_pdk14) // Lack of memory
  int r[4]={2,2,2,2};
  float a[]={5,1,3,5};
  float b[]={2,4,3,0};

  f(r,a,b,4);
  ASSERT ((a[0]==b[0]) == r[0]);
  ASSERT ((a[1]==b[1]) == r[1]);
  ASSERT ((a[2]==b[2]) == r[2]);
  ASSERT ((a[3]==b[3]) == r[3]);
  return;
#endif
}