struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20010925-1.c
blob40d67b4f59c79e3c1c28dfa8b42213390a0ac5fa
1 /*
2 20010925-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #include <string.h>
13 int foo (void *, void *, unsigned int c);
15 int src[10];
16 int dst[10];
18 void
19 testTortureExecute (void)
21 #ifndef __SDCC_pdk14 // Lack of memory
22 if (foo (dst, src, 10) != 0)
23 ASSERT (0);
24 return;
25 #endif
28 #ifndef __SDCC_pdk14 // Lack of memory
29 int foo (void *a, void *b, unsigned int c)
31 if (c == 0)
32 return 1;
34 memcpy (a, b, c);
35 return 0;
37 #endif