struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20080117-1.c
blob717859beca7a25b22bef2ffd63bc87b728b39db6
1 /*
2 20080117-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 typedef struct gs_imager_state_s {
14 struct {
15 int half_width;
16 int cap;
17 float miter_limit;
18 } line_params;
19 } gs_imager_state;
20 static const gs_imager_state gstate_initial = { { 1 } };
21 void gstate_path_memory(gs_imager_state *pgs) {
22 /**pgs = gstate_initial; not yet supported by sdcc */
23 memcpy (pgs, &gstate_initial, sizeof (gstate_initial));
25 int gs_state_update_overprint(void)
27 return gstate_initial.line_params.half_width;
30 void
31 testTortureExecute (void)
33 if (gs_state_update_overprint() != 1)
34 ASSERT (0);
35 return;