Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20001026-1.c
blob1b86b0ec9b88e0f89bd69ab491ae725b552d6bdb
1 /*
2 20001026-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 // TODO: Enable when sdcc supports struct!
14 #if 0
15 typedef struct {
16 long r[(19 + sizeof (long))/(sizeof (long))];
17 } realvaluetype;
19 typedef void *tree;
21 static realvaluetype
22 real_value_from_int_cst (tree x, tree y)
24 realvaluetype r;
25 int i;
26 for (i = 0; i < sizeof(r.r)/sizeof(long); ++i)
27 r.r[i] = -1;
28 return r;
31 struct brfic_args
33 tree type;
34 tree i;
35 realvaluetype d;
38 static void
39 build_real_from_int_cst_1 (data)
40 void * data;
42 struct brfic_args *args = (struct brfic_args *) data;
43 args->d = real_value_from_int_cst (args->type, args->i);
45 #endif
47 void
48 testTortureExecute (void)
50 #if 0
51 struct brfic_args args;
53 memset (&args, 0, sizeof(args));
54 build_real_from_int_cst_1 (&args);
56 if (args.d.r[0] == 0)
57 ASSERT (0);
58 return;
59 #endif