[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-dev] Another union issue



Hello again,

Xuejun wrote:
> this is fixed in commit a39f3c. Thanks for catching my wrong assumption.

I must attest that I have been running tests based on a39f3c
since it was committed, and the issue is gone. I believe this
new question is about something else, and again, I am not
confident what is right. I have upgraded to f0ba611, the latest version.
It is again about unions and initialization.

The attached program can be reduced to the following from the
point of view of my problem:

union U3 {
   const unsigned f0 : _CSMITH_BITFIELD(41);
   const signed : _CSMITH_BITFIELD(0);
   int8_t * const  f1;
   int64_t  f2;
   const uint32_t  f3;
};

static union U3 g_142[1][1] = {{{1UL}}};

main(){
...
    for (i = 0; i < 1; i++)
    {
        for (j = 0; j < 1; j++)
        {
            transparent_crc(g_142[i][j].f3, "g_142[i][j].f3", print_hash_value);
            if (print_hash_value) printf("index = [%d][%d]\n", i, j);

        }
    }
}

There is an assignment to g_142[0][0].f2 in the original, but you can check by inserting exit(1); right before it that it is not reached.
So field f0 of g_142[0][0] is initialized, and much late, member f3 is passed to transparent_crc().

Is that supposed to be defined?

I tried to get the information from C99's 6.7.8 section, but it is not clear to me. However, objects are initialized according to their types: pointers to NULL and integers to zero. An union can have both and integer member and a pointer member. And NULL's representation does not have to be the same as that of the integer zero. So I do not see how 6.7.8 could be saying that more than one member of an union should be initialized.

What do you think?

One argument to be made is that the program is in any case safe in practice on desktop architectures where NULL and 0 have the same representation, made of zeroes, and static variables are mapped to a segment that contains only zeroes. It wouldn't be to hard to have an option in Frama-C to implement the same point of view.

Pascal

/*
 * This is a RANDOMLY GENERATED PROGRAM.
 *
 * Generator: csmith 2.1.0
 * Git version: f0ba611
 * Options:   --max-pointer-depth 3 --max-funcs 2 --max-array-dim 2 --max-array-len-per-dim 3 --max-struct-fields 5 --no-volatiles --no-argc --unions
 * Seed:      2805222449
 */

#include "csmith.h"


static long __undefined;

/* --- Struct/Union Declarations --- */
struct S0 {
   int32_t  f0;
   const uint16_t  f1;
};

union U1 {
   int8_t * const  f0;
   int32_t  f1;
   int8_t  f2;
   int8_t * f3;
};

union U2 {
   int32_t  f0;
};

union U3 {
   const unsigned f0 : _CSMITH_BITFIELD(41);
   const signed : _CSMITH_BITFIELD(0);
   int8_t * const  f1;
   int64_t  f2;
   const uint32_t  f3;
};

/* --- GLOBAL VARIABLES --- */
static int16_t g_7 = 0L;
static uint16_t g_13 = 65529UL;
static uint16_t g_19 = 65531UL;
static uint16_t *g_18[2] = {&g_19, &g_19};
static uint16_t g_24 = 0x6A6CL;
static int32_t g_27[3] = {(-2L), (-2L), (-2L)};
static int8_t g_58 = 0xCBL;
static uint8_t g_66 = 0x3FL;
static int32_t *g_69 = &g_27[0];
static uint32_t g_93 = 0UL;
static union U3 g_142[1][1] = {{{1UL}}};
static uint32_t *g_158 = &g_93;
static uint32_t **g_157[3] = {&g_158, &g_158, &g_158};
static uint16_t g_200 = 65535UL;
static const union U1 g_202 = {0};
static union U2 g_208 = {0x287B85CEL};
static uint8_t *g_216 = &g_66;
static uint8_t **g_215 = &g_216;
static uint8_t g_219 = 0x18L;
static int16_t g_248 = (-9L);
static uint32_t g_267 = 0UL;
static int64_t g_270 = 0x2566770F7D34659FLL;
static int64_t *g_269 = &g_270;
static int16_t g_292[1] = {0xB65AL};
static uint16_t g_298[3] = {0xFB48L, 0xFB48L, 0xFB48L};
static struct S0 g_337[3] = {{3L,0x50E7L}, {3L,0x50E7L}, {3L,0x50E7L}};
static int32_t g_386 = 1L;
static int32_t g_388 = 1L;


/* --- FORWARD DECLARATIONS --- */
static union U1  func_1(void);
static uint8_t  func_14(uint16_t * p_15, union U2  p_16, uint16_t * p_17);


/* --- FUNCTIONS --- */
/* ------------------------------------------ */
/* 
 * reads : g_7 g_18 g_19 g_27 g_66 g_69 g_58 g_93 g_142 g_157 g_158 g_24 g_202 g_208 g_219 g_267 g_269 g_248 g_292 g_208.f0 g_270 g_298 g_337 g_216 g_215 g_200 g_386 g_388
 * writes: g_7 g_13 g_27 g_19 g_66 g_69 g_93 g_24 g_157 g_142.f2 g_219 g_267 g_248 g_292 g_208.f0 g_298 g_200 g_386 g_388
 */
static union U1  func_1(void)
{ /* block id: 0 */
    int16_t *l_6 = &g_7;
    uint16_t *l_12 = &g_13;
    union U2 l_20[1] = {{1L}};
    int32_t *l_385 = &g_386;
    int32_t *l_387[3][1];
    int i, j;
    for (i = 0; i < 3; i++)
    {
        for (j = 0; j < 1; j++)
            l_387[i][j] = &g_388;
    }
    g_388 ^= ((safe_sub_func_uint64_t_u_u(((safe_rshift_func_int16_t_s_s(0L, ((((*l_6) ^= 0x8884L) , (safe_mul_func_int16_t_s_s(((safe_lshift_func_uint16_t_u_s(((*l_12) = 0x8875L), ((((**g_215) = func_14(g_18[0], l_20[0], l_12)) < l_20[0].f0) ^ ((!(((*l_385) &= ((l_6 == g_18[0]) != 0UL)) , l_20[0].f0)) >= 8UL)))) & l_20[0].f0), l_20[0].f0))) , 0L))) != g_58), 0xBF495CD00E1A1BC7LL)) >= l_20[0].f0);
    return g_202;
}


/* ------------------------------------------ */
/* 
 * reads : g_7 g_19 g_27 g_66 g_69 g_58 g_93 g_142 g_157 g_158 g_24 g_202 g_208 g_219 g_267 g_269 g_248 g_292 g_208.f0 g_270 g_298 g_337 g_216 g_215 g_200
 * writes: g_7 g_27 g_19 g_66 g_69 g_93 g_24 g_157 g_142.f2 g_219 g_267 g_248 g_292 g_208.f0 g_298 g_200
 */
static uint8_t  func_14(uint16_t * p_15, union U2  p_16, uint16_t * p_17)
{ /* block id: 3 */
    uint64_t l_28 = 0x935DB5A26CDEE94CLL;
    int64_t l_29 = 0xE3268DD2AC30BCA0LL;
    int32_t *l_30 = &g_27[0];
    int32_t *l_31 = &g_27[1];
    int32_t l_32 = (-1L);
    int32_t *l_33 = &g_27[0];
    int32_t *l_34 = &g_27[0];
    int32_t *l_35 = &g_27[1];
    int32_t *l_36 = &g_27[2];
    int32_t *l_37 = &l_32;
    int32_t *l_38 = &g_27[0];
    int32_t *l_39 = &l_32;
    int32_t *l_40[2][3] = {{&g_27[0], &g_27[0], &g_27[0]}, {&g_27[0], &g_27[0], &g_27[0]}};
    int16_t l_41 = 0L;
    struct S0 l_50[2][2] = {{{6L,65530UL}, {6L,65530UL}}, {{6L,65530UL}, {6L,65530UL}}};
    int16_t *l_51[2][2];
    int8_t *l_57 = &g_58;
    int8_t *l_61 = &g_58;
    int32_t *l_110 = &g_27[1];
    uint32_t l_179 = 0UL;
    uint8_t l_182 = 0xD0L;
    int64_t l_212 = 0xD65A8F09C824AA73LL;
    uint8_t l_226 = 0x0BL;
    uint8_t ***l_237[1];
    int32_t *l_242 = &g_27[2];
    int32_t l_306 = 0L;
    int32_t *l_329[3][3] = {{&g_27[0], &g_27[0], &g_27[0]}, {&g_27[0], &g_27[0], &g_27[0]}, {&g_27[0], &g_27[0], &g_27[0]}};
    int16_t l_382 = (-9L);
    int i, j;
    for (i = 0; i < 2; i++)
    {
        for (j = 0; j < 2; j++)
            l_51[i][j] = &l_41;
    }
    for (i = 0; i < 1; i++)
        l_237[i] = &g_215;
    for (g_7 = 0; (g_7 <= 10); ++g_7)
    { /* block id: 6 */
        uint16_t *l_23[2];
        int32_t l_25[3][1];
        int32_t *l_26[3][2];
        int i, j;
        for (i = 0; i < 2; i++)
            l_23[i] = &g_24;
        for (i = 0; i < 3; i++)
        {
            for (j = 0; j < 1; j++)
                l_25[i][j] = (-1L);
        }
        for (i = 0; i < 3; i++)
        {
            for (j = 0; j < 2; j++)
                l_26[i][j] = &g_27[0];
        }
        l_28 = (65535UL != (l_25[2][0] &= (*p_15)));
    }
    (*l_30) = l_29;
    l_41--;
    if ((((*l_34) , g_19) ^ (((((*l_39) = (safe_sub_func_int16_t_s_s((-7L), (safe_sub_func_uint32_t_u_u(((*l_38) > (safe_sub_func_uint64_t_u_u(0x781FA89BF9805026LL, ((1L == ((p_16.f0 , l_50[1][0]) , 0x2DBD2431L)) | 4L)))), g_7))))) & p_16.f0) != 0xFCL) ^ g_19)))
    { /* block id: 13 */
        struct S0 l_54[2] = {{0xA1C1E79BL,0xF94FL}, {0xA1C1E79BL,0xF94FL}};
        union U3 l_62 = {0x8ECBDE39L};
        int32_t l_71 = 0x713F97C6L;
        int32_t l_72 = 8L;
        int32_t l_76 = 0xDB521C19L;
        int32_t l_78 = 0L;
        int16_t l_79[1];
        const uint8_t *l_82[2][1];
        int32_t *l_86 = &l_78;
        int8_t l_104 = 0x9CL;
        int i, j;
        for (i = 0; i < 1; i++)
            l_79[i] = 0xB304L;
        for (i = 0; i < 2; i++)
        {
            for (j = 0; j < 1; j++)
                l_82[i][j] = (void*)0;
        }
        for (g_7 = 0; (g_7 >= (-17)); --g_7)
        { /* block id: 16 */
            int8_t *l_59[3];
            int8_t **l_60[2][2] = {{&l_59[1], &l_57}, {&l_59[1], &l_57}};
            uint8_t *l_65 = &g_66;
            int32_t l_67 = 0xA24DD39DL;
            int32_t **l_68[3];
            int i, j;
            for (i = 0; i < 3; i++)
                l_59[i] = (void*)0;
            for (i = 0; i < 3; i++)
                l_68[i] = &l_40[1][1];
            (*l_30) = (((((l_54[0] , 0x30EEL) ^ (safe_mul_func_uint32_t_u_u(4294967293UL, (l_57 == (l_61 = l_59[1]))))) < (((l_62 , ((--(*p_15)) && (*p_15))) | ((*l_65) ^= p_16.f0)) <= 0x2F4DE99EL)) < l_67) | 0L);
            g_69 = &g_27[1];
        }
        if ((~l_54[0].f0))
        { /* block id: 23 */
            int32_t l_70 = 1L;
            int32_t l_73 = 6L;
            int32_t l_74 = 0L;
            int32_t l_75 = 1L;
            int32_t l_77[3][1];
            uint8_t *l_84 = &g_66;
            uint8_t **l_83 = &l_84;
            int i, j;
            for (i = 0; i < 3; i++)
            {
                for (j = 0; j < 1; j++)
                    l_77[i][j] = 1L;
            }
            ++l_79[0];
            (*g_69) ^= (l_82[1][0] == ((*l_83) = &g_66));
        }
        else
        { /* block id: 27 */
            int32_t * const l_85[1][2] = {{&l_76, &l_76}};
            int32_t l_96 = 0x7FD5A9A7L;
            int i, j;
            l_86 = l_85[0][0];
            for (g_66 = 0; (g_66 <= 1); g_66 += 1)
            { /* block id: 31 */
                int8_t l_89 = 0xF1L;
                uint32_t *l_92 = &g_93;
                int32_t l_102[2];
                int i;
                for (i = 0; i < 2; i++)
                    l_102[i] = 0xE68E90F1L;
                (*g_69) = ((*l_86) ^= (safe_lshift_func_int8_t_s_u((((g_27[2] || (l_89 != p_16.f0)) & (((*l_92) = (~(safe_lshift_func_int8_t_s_u((p_16.f0 & g_58), 5)))) == l_89)) <= p_16.f0), (g_27[0] | ((*l_37) < g_66)))));
                (*l_35) |= ((safe_lshift_func_int8_t_s_s(0xCBL, 0)) , (*l_86));
                if ((*g_69))
                    break;
                (*l_86) = (*g_69);
                for (g_7 = 0; (g_7 <= 1); g_7 += 1)
                { /* block id: 40 */
                    uint8_t l_97 = 0xA7L;
                    int32_t l_98 = (-3L);
                    int32_t l_101 = 0x9A246CE1L;
                    int32_t l_103 = 0x7C23372FL;
                    int32_t **l_109[3];
                    int i, j;
                    for (i = 0; i < 3; i++)
                        l_109[i] = &l_34;
                    for (l_32 = 1; (l_32 >= 0); l_32 -= 1)
                    { /* block id: 43 */
                        int i, j;
                        (*l_33) &= (g_66 == ((0x2F28BEF3L || (p_16.f0 < ((((*l_39) <= (((l_97 = (l_96 |= 0L)) == l_89) == l_98)) , (g_66 && ((safe_div_func_int32_t_s_s((((p_16.f0 == 1UL) != 0x2293L) , (-1L)), l_98)) == (*l_86)))) < p_16.f0))) , 0xC2C0C57DL));
                        return g_27[0];
                    }
                    ++l_104;
                    l_98 |= (safe_add_func_int32_t_s_s((p_16.f0 & (*l_86)), ((*l_37) ^= (*l_31))));
                    l_110 = &l_101;
                }
            }
        }
    }
    else
    { /* block id: 56 */
        int32_t **l_111[3][3] = {{&l_36, &l_36, &l_38}, {&l_36, &l_36, &l_38}, {&l_36, &l_36, &l_38}};
        union U3 l_141 = {4294967295UL};
        union U1 l_163 = {0};
        uint32_t * const *l_165 = (void*)0;
        uint8_t *l_222 = (void*)0;
        uint8_t ***l_238 = (void*)0;
        int16_t l_255 = 0L;
        uint8_t l_261[3][1];
        uint8_t l_310 = 0x3DL;
        int8_t l_366 = 1L;
        int i, j;
        for (i = 0; i < 3; i++)
        {
            for (j = 0; j < 1; j++)
                l_261[i][j] = 0x0CL;
        }
        l_34 = &g_27[0];
        for (g_19 = 0; (g_19 <= 1); g_19 += 1)
        { /* block id: 60 */
            int8_t *l_122 = &g_58;
            int32_t l_146 = 0xA4C9A174L;
            int32_t l_148[2];
            uint32_t **l_161 = &g_158;
            int8_t l_172 = (-1L);
            int32_t *l_183 = &l_163.f1;
            uint8_t * const l_218 = &g_219;
            uint8_t * const *l_217 = &l_218;
            int i;
            for (i = 0; i < 2; i++)
                l_148[i] = 0x0A1DA366L;
            for (p_16.f0 = 0; (p_16.f0 <= 1); p_16.f0 += 1)
            { /* block id: 63 */
                uint64_t l_114 = 18446744073709551615UL;
                int32_t l_147 = 0xAE12ECCDL;
                const uint32_t l_162[3] = {18446744073709551609UL, 18446744073709551609UL, 18446744073709551609UL};
                uint32_t * const *l_164 = &g_158;
                int64_t *l_173 = (void*)0;
                int64_t *l_174[3][2] = {{&l_141.f2, &l_29}, {&l_141.f2, &l_29}, {&l_141.f2, &l_29}};
                int32_t l_177 = 0xA12F1B8EL;
                int32_t l_178[3];
                int i, j;
                for (i = 0; i < 3; i++)
                    l_178[i] = 0x3E6DED1BL;
                if ((*g_69))
                { /* block id: 64 */
                    int32_t l_112 = 0L;
                    int32_t l_113 = (-1L);
                    uint16_t *l_121 = &g_24;
                    int i, j;
                    for (g_93 = 0; (g_93 <= 1); g_93 += 1)
                    { /* block id: 67 */
                        if ((*g_69))
                            break;
                        if (l_112)
                            continue;
                    }
                    l_114--;
                    if ((safe_rshift_func_int8_t_s_s(((((((g_27[0] & ((*p_15) | ((*l_121) = (safe_div_func_uint32_t_u_u(4294967288UL, 0x77CF8A12L))))) , l_122) == (void*)0) | p_16.f0) > p_16.f0) & p_16.f0), 3)))
                    { /* block id: 73 */
                        uint16_t l_123[1][2];
                        int i, j;
                        for (i = 0; i < 1; i++)
                        {
                            for (j = 0; j < 2; j++)
                                l_123[i][j] = 65529UL;
                        }
                        --l_123[0][0];
                        return g_93;
                    }
                    else
                    { /* block id: 76 */
                        int16_t *l_140 = &g_7;
                        int32_t l_143 = 1L;
                        (*l_38) = (p_16.f0 , (l_114 != (p_16.f0 >= ((safe_mul_func_uint8_t_u_u((safe_div_func_uint16_t_u_u((safe_sub_func_uint8_t_u_u((p_16.f0 < (safe_lshift_func_int16_t_s_s(((safe_lshift_func_uint16_t_u_s((safe_lshift_func_uint16_t_u_s((*p_15), 10)), p_16.f0)) != (safe_mul_func_int16_t_s_s(((void*)0 != l_140), ((l_141 , g_142[0][0]) , g_58)))), g_27[2]))), g_27[1])), l_114)), l_143)) || 0L))));
                    }
                    for (g_24 = 0; (g_24 < 26); ++g_24)
                    { /* block id: 81 */
                        uint32_t l_149 = 0x51D08031L;
                        (*l_36) = ((!p_16.f0) | (*g_69));
                        if ((*g_69))
                            break;
                        if ((*g_69))
                            continue;
                        l_149++;
                    }
                }
                else
                { /* block id: 87 */
                    l_110 = (void*)0;
                    for (l_28 = (-26); (l_28 == 12); ++l_28)
                    { /* block id: 91 */
                        int8_t l_154 = 0xDEL;
                        uint32_t **l_160 = &g_158;
                        uint32_t ***l_159[2][1];
                        int i, j;
                        for (i = 0; i < 2; i++)
                        {
                            for (j = 0; j < 1; j++)
                                l_159[i][j] = &l_160;
                        }
                        ++l_154;
                        l_161 = (g_157[0] = g_157[0]);
                        (*l_39) &= l_162[2];
                    }
                    if ((*l_33))
                        continue;
                }
                (*l_39) &= (((**l_164) = ((((l_165 = (l_163 , l_164)) == l_161) | p_16.f0) | (safe_add_func_uint32_t_u_u((*g_158), l_114)))) , (((safe_add_func_int64_t_s_s((g_142[0][0].f2 = (safe_rshift_func_uint8_t_u_u(0x08L, l_172))), ((safe_rshift_func_uint8_t_u_s(p_16.f0, g_27[0])) , l_114))) | (*p_15)) > 1UL));
                l_179++;
            }
            (*l_35) = l_182;
            l_183 = &g_27[0];
            for (l_32 = 0; (l_32 == 8); l_32 = safe_add_func_int16_t_s_s(l_32, 8))
            { /* block id: 109 */
                int8_t l_186 = 0x37L;
                int64_t *l_187 = &l_29;
                uint8_t *l_196 = &l_182;
                uint16_t *l_199[3];
                int32_t l_201[3];
                uint8_t * const *l_221[3][3] = {{&l_218, (void*)0, &l_218}, {&l_218, (void*)0, &l_218}, {&l_218, (void*)0, &l_218}};
                uint8_t * const **l_220 = &l_221[2][2];
                uint8_t **l_223 = &l_196;
                int64_t l_227 = 1L;
                uint8_t l_228 = 1UL;
                int8_t **l_240 = &l_57;
                int8_t l_257[2];
                int i, j;
                for (i = 0; i < 3; i++)
                    l_199[i] = &g_200;
                for (i = 0; i < 3; i++)
                    l_201[i] = 0x29F12BCDL;
                for (i = 0; i < 2; i++)
                    l_257[i] = 0L;
                if ((l_186 >= (((*l_187) ^= g_27[2]) , (((*l_30) = ((((safe_mod_func_uint16_t_u_u((+(safe_add_func_uint64_t_u_u((((l_148[1] |= (l_201[2] |= (g_7 = (safe_mul_func_uint8_t_u_u(((*l_196) = ((g_66 != (*l_183)) , (safe_lshift_func_uint8_t_u_u(g_24, 0)))), (1UL ^ ((l_146 = ((safe_rshift_func_int8_t_s_u(p_16.f0, g_27[0])) > l_186)) != l_186))))))) , g_202) , g_93), 0x5F2836864C590541LL))), p_16.f0)) < (-1L)) >= 0x5DL) <= p_16.f0)) ^ p_16.f0))))
                { /* block id: 117 */
                    uint32_t l_203 = 1UL;
                    int32_t *l_204[3];
                    int32_t *l_205 = &l_148[0];
                    int i;
                    for (i = 0; i < 3; i++)
                        l_204[i] = &l_148[1];
                    l_205 = (l_183 = (l_203 , (l_204[1] = &g_27[1])));
                }
                else
                { /* block id: 121 */
                    int32_t l_209 = (-1L);
                    (*l_38) |= (safe_mul_func_int8_t_s_s(0x5BL, ((!p_16.f0) ^ (p_16.f0 , (g_208 , ((**l_161) = ((-4L) | l_209)))))));
                    (*l_36) |= 0x115D690BL;
                }
            }
        }
        if (p_16.f0)
        { /* block id: 165 */
            uint32_t l_260 = 0x082D228DL;
            for (l_226 = (-17); (l_226 > 29); ++l_226)
            { /* block id: 168 */
                return l_260;
            }
        }
        else
        { /* block id: 171 */
            uint64_t l_263 = 1UL;
            int32_t l_280 = 0x28384AC0L;
            int32_t l_284 = (-1L);
            int32_t l_285 = 0xF6079FCFL;
            int16_t l_303 = 0x89AEL;
            int32_t l_356 = 0xF51C2348L;
            int32_t l_359 = 0x36DCCB5AL;
            int32_t l_365 = 0x80080636L;
            (*l_242) = (p_16 , p_16.f0);
            for (g_219 = 0; (g_219 <= 0); g_219 += 1)
            { /* block id: 175 */
                const uint8_t l_262 = 1UL;
                struct S0 l_268 = {0xE07E2706L,5UL};
                int32_t l_273 = (-8L);
                int32_t l_274 = 0xBFC39C17L;
                int32_t l_283 = 0x055C2ACDL;
                int i;
                for (g_19 = 0; g_19 < 2; g_19 += 1)
                {
                    for (l_29 = 0; l_29 < 3; l_29 += 1)
                    {
                        l_40[g_19][l_29] = &g_27[0];
                    }
                }
                if ((!(l_261[0][0] && (0xFC19A040L != (l_262 || ((*g_158) , l_263))))))
                { /* block id: 177 */
                    uint32_t **l_271 = &g_158;
                    for (l_263 = 0; (l_263 <= 0); l_263 += 1)
                    { /* block id: 180 */
                        uint64_t *l_266[3];
                        int i;
                        for (i = 0; i < 3; i++)
                            l_266[i] = &l_28;
                        (*l_35) = ((5L > (safe_mul_func_int8_t_s_s((*l_39), 0x3BL))) < (((g_267 ^= 1UL) > p_16.f0) || (0xC6AD0894L == (l_268 , ((((g_269 == (void*)0) > 252UL) , l_271) != l_165)))));
                        return l_268.f1;
                    }
                }
                else
                { /* block id: 185 */
                    uint8_t l_275 = 0x6BL;
                    int32_t l_291[1][1];
                    union U3 l_305 = {0x65652534L};
                    uint32_t *l_307 = &g_93;
                    int32_t l_308 = (-1L);
                    int i, j;
                    for (i = 0; i < 1; i++)
                    {
                        for (j = 0; j < 1; j++)
                            l_291[i][j] = (-1L);
                    }
                    for (g_248 = 0; (g_248 >= 0); g_248 -= 1)
                    { /* block id: 188 */
                        uint32_t l_272 = 0x7303B417L;
                        (*g_69) ^= p_16.f0;
                        (*l_34) |= (p_16.f0 , 0x6A77FA5BL);
                        (*g_69) = l_272;
                        l_275--;
                    }
                    for (l_41 = 0; (l_41 <= 0); l_41 += 1)
                    { /* block id: 196 */
                        union U2 *l_279[1][2];
                        union U2 **l_278 = &l_279[0][1];
                        int32_t l_281 = 0x9E16A0E5L;
                        int32_t l_282 = (-2L);
                        int32_t l_286 = 0x89B279C3L;
                        int32_t l_287 = 0x4CA13E25L;
                        uint8_t l_288 = 0xDBL;
                        int i, j;
                        for (i = 0; i < 1; i++)
                        {
                            for (j = 0; j < 2; j++)
                                l_279[i][j] = &g_208;
                        }
                        (*l_278) = &p_16;
                        l_288--;
                    }
                    g_292[0]--;
                    for (l_226 = 0; (l_226 <= 1); l_226 += 1)
                    { /* block id: 203 */
                        uint16_t * const l_297 = &g_298[1];
                        uint16_t * const *l_296 = &l_297;
                        uint16_t * const **l_295 = &l_296;
                        uint16_t * const *l_300 = (void*)0;
                        uint16_t * const **l_299 = &l_300;
                        uint32_t * const l_304[3] = {&g_93, &g_93, &g_93};
                        int i;
                        (*l_299) = ((*l_295) = (void*)0);
                        l_308 = ((l_303 = (safe_rshift_func_uint16_t_u_s(g_292[g_219], 2))) < (l_304[1] != ((l_305 , (((g_292[g_219] < ((249UL ^ g_292[g_219]) ^ ((!(((*g_158) ^= (l_291[0][0] = ((0x7912113FL & 0xB552CC7CL) < ((*l_36) = (l_306 != (*l_31)))))) >= 4294967286UL)) , p_16.f0))) == p_16.f0) , 2UL)) , l_307)));
                        return p_16.f0;
                    }
                }
                for (g_208.f0 = 0; (g_208.f0 >= 0); g_208.f0 -= 1)
                { /* block id: 216 */
                    for (l_263 = 0; (l_263 <= 0); l_263 += 1)
                    { /* block id: 219 */
                        uint32_t l_309 = 0UL;
                        l_283 &= (*g_69);
                        (*l_31) = l_268.f1;
                        l_310 ^= (((*g_269) , l_309) != l_309);
                    }
                }
                for (g_7 = 0; (g_7 >= 0); g_7 -= 1)
                { /* block id: 227 */
                    uint8_t l_311[2];
                    int i;
                    for (i = 0; i < 2; i++)
                        l_311[i] = 1UL;
                    --l_311[1];
                    for (l_182 = 0; (l_182 <= 1); l_182 += 1)
                    { /* block id: 231 */
                        return p_16.f0;
                    }
                }
            }
            if (((*l_37) = ((safe_div_func_uint64_t_u_u(18446744073709551612UL, (l_280 , p_16.f0))) , (*g_69))))
            { /* block id: 237 */
                int32_t *l_316 = &l_32;
                l_316 = &g_27[0];
            }
            else
            { /* block id: 239 */
                int64_t l_324 = 0xFB23BA3EBB224FDALL;
                int32_t l_338 = 0xAFF7FA8EL;
                uint32_t l_341[2];
                int32_t l_357[3];
                uint16_t l_369 = 0xED48L;
                int32_t *l_372[2][1];
                union U3 l_377[1] = {{0x09C4B126L}};
                int i, j;
                for (i = 0; i < 2; i++)
                    l_341[i] = 7UL;
                for (i = 0; i < 3; i++)
                    l_357[i] = 0xED671C62L;
                for (i = 0; i < 2; i++)
                {
                    for (j = 0; j < 1; j++)
                        l_372[i][j] = &l_163.f1;
                }
                if ((*g_69))
                { /* block id: 240 */
                    uint32_t l_321[3][3] = {{0x4DC92E5CL, 0xFB22B934L, 0x4DC92E5CL}, {0x4DC92E5CL, 0xFB22B934L, 0x4DC92E5CL}, {0x4DC92E5CL, 0xFB22B934L, 0x4DC92E5CL}};
                    int32_t *l_328 = &g_27[0];
                    int i, j;
                    for (l_29 = (-5); (l_29 <= (-26)); l_29 = safe_sub_func_uint16_t_u_u(l_29, 1))
                    { /* block id: 243 */
                        int8_t l_325[2][3] = {{0x0CL, (-8L), 0x0CL}, {0x0CL, (-8L), 0x0CL}};
                        int i, j;
                        (*l_39) ^= (safe_mul_func_uint8_t_u_u((+p_16.f0), p_16.f0));
                        --l_321[2][0];
                        l_325[1][0]++;
                        l_329[2][1] = l_328;
                    }
                }
                else
                { /* block id: 249 */
                    uint64_t l_346 = 0UL;
                    const int64_t l_352 = 0L;
                    int64_t *l_353 = &l_29;
                    int32_t l_354 = 0x14939EB4L;
                    int32_t l_355 = 0x2175B5E6L;
                    int32_t l_358 = 0x00B15A4EL;
                    int32_t l_360 = 0x84F6F880L;
                    int32_t l_361 = 0L;
                    int32_t l_362 = 1L;
                    int32_t l_363 = (-1L);
                    int32_t l_364[3];
                    uint64_t *l_370 = &l_263;
                    int i;
                    for (i = 0; i < 3; i++)
                        l_364[i] = 0xC6931B3FL;
                    if ((*g_69))
                    { /* block id: 250 */
                        uint16_t *l_334 = &g_298[1];
                        (*g_69) |= ((safe_rshift_func_uint16_t_u_u(((*l_334) |= ((*p_15)++)), 1)) < ((p_16.f0 != 0UL) && ((*g_216) = ((((safe_rshift_func_int16_t_s_s((g_337[0] , (l_338 = l_303)), 12)) < l_324) && p_16.f0) != p_16.f0))));
                        if (g_58)
                            goto lbl_347;
                        return (*g_216);
                    }
                    else
                    { /* block id: 257 */
lbl_347:
                        (*g_69) = (safe_rshift_func_uint8_t_u_u(((**g_215) = l_324), (((((*g_158) = l_341[1]) , ((*g_69) <= ((g_208.f0 < p_16.f0) > (65527UL >= ((safe_sub_func_int32_t_s_s((((safe_add_func_uint32_t_u_u((l_346 | (p_16.f0 && (*g_69))), p_16.f0)) & p_16.f0) , 7L), 3L)) , 0L))))) , (void*)0) != (void*)0)));
                        l_354 ^= ((*l_39) |= ((((*g_269) && p_16.f0) | ((safe_mod_func_uint32_t_u_u(l_352, ((((p_16 , 0x84FBE84A8F585ABBLL) < ((*l_353) |= p_16.f0)) > (*g_69)) , p_16.f0))) > ((~((*g_216) = (l_338 && p_16.f0))) <= p_16.f0))) <= 0x75D46DE8L));
                    }
                    l_366--;
                    if ((((*l_370) = l_369) || 0xB5E790A7A44D2199LL))
                    { /* block id: 269 */
                        int32_t *l_371 = &l_357[1];
                        l_372[0][0] = l_371;
                        (*l_30) |= p_16.f0;
                    }
                    else
                    { /* block id: 272 */
                        (*l_38) = (*g_69);
                    }
                }
                for (g_200 = 0; (g_200 <= 2); g_200 += 1)
                { /* block id: 278 */
                    uint32_t ***l_374 = &g_157[0];
                    uint32_t ****l_373 = &l_374;
                    (*l_373) = &g_157[0];
                }
                (*l_33) = (safe_mod_func_uint8_t_u_u(p_16.f0, (l_377[0] , p_16.f0)));
            }
        }
        (*l_37) |= (safe_add_func_uint16_t_u_u(((*l_38) > (safe_add_func_uint32_t_u_u(l_382, ((*l_34) > (safe_add_func_int64_t_s_s(0x7843D38D4666E95ELL, ((**g_215) ^ (*l_31)))))))), g_27[0]));
    }
    return (**g_215);
}




/* ---------------------------------------- */
int main (void)
{
    int i, j;
    int print_hash_value = 0;
    platform_main_begin();
    crc32_gentab();
    func_1();
    transparent_crc(g_7, "g_7", print_hash_value);
    transparent_crc(g_13, "g_13", print_hash_value);
    transparent_crc(g_19, "g_19", print_hash_value);
    transparent_crc(g_24, "g_24", print_hash_value);
    for (i = 0; i < 3; i++)
    {
        transparent_crc(g_27[i], "g_27[i]", print_hash_value);
        if (print_hash_value) printf("index = [%d]\n", i);

    }
    transparent_crc(g_58, "g_58", print_hash_value);
    transparent_crc(g_66, "g_66", print_hash_value);
    transparent_crc(g_93, "g_93", print_hash_value);
    for (i = 0; i < 1; i++)
    {
        for (j = 0; j < 1; j++)
        {
            transparent_crc(g_142[i][j].f3, "g_142[i][j].f3", print_hash_value);
            if (print_hash_value) printf("index = [%d][%d]\n", i, j);

        }
    }
    transparent_crc(g_200, "g_200", print_hash_value);
    transparent_crc(g_208.f0, "g_208.f0", print_hash_value);
    transparent_crc(g_219, "g_219", print_hash_value);
    transparent_crc(g_248, "g_248", print_hash_value);
    transparent_crc(g_267, "g_267", print_hash_value);
    transparent_crc(g_270, "g_270", print_hash_value);
    for (i = 0; i < 1; i++)
    {
        transparent_crc(g_292[i], "g_292[i]", print_hash_value);
        if (print_hash_value) printf("index = [%d]\n", i);

    }
    for (i = 0; i < 3; i++)
    {
        transparent_crc(g_298[i], "g_298[i]", print_hash_value);
        if (print_hash_value) printf("index = [%d]\n", i);

    }
    for (i = 0; i < 3; i++)
    {
        transparent_crc(g_337[i].f0, "g_337[i].f0", print_hash_value);
        transparent_crc(g_337[i].f1, "g_337[i].f1", print_hash_value);
        if (print_hash_value) printf("index = [%d]\n", i);

    }
    transparent_crc(g_386, "g_386", print_hash_value);
    transparent_crc(g_388, "g_388", print_hash_value);
    platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
    return 0;
}

/************************ statistics *************************
XXX max struct depth: 1
breakdown:
   depth: 0, occurrence: 146
   depth: 1, occurrence: 4
XXX total union variables: 9

XXX non-zero bitfields defined in structs: 2
XXX zero bitfields defined in structs: 1
XXX const bitfields defined in structs: 2
XXX volatile bitfields defined in structs: 0
XXX structs with bitfields in the program: 5
breakdown:
   indirect level: 0, occurrence: 5
XXX full-bitfields structs in the program: 0
breakdown:
XXX times a bitfields struct's address is taken: 0
XXX times a bitfields struct on LHS: 0
XXX times a bitfields struct on RHS: 6
XXX times a single bitfield on LHS: 0
XXX times a single bitfield on RHS: 0

XXX max expression depth: 26
breakdown:
   depth: 1, occurrence: 122
   depth: 2, occurrence: 29
   depth: 3, occurrence: 6
   depth: 4, occurrence: 2
   depth: 5, occurrence: 2
   depth: 7, occurrence: 2
   depth: 11, occurrence: 1
   depth: 13, occurrence: 2
   depth: 14, occurrence: 1
   depth: 15, occurrence: 3
   depth: 16, occurrence: 1
   depth: 17, occurrence: 1
   depth: 18, occurrence: 2
   depth: 20, occurrence: 1
   depth: 23, occurrence: 1
   depth: 26, occurrence: 1

XXX total number of pointers: 103

XXX times a variable address is taken: 39
XXX times a pointer is dereferenced on RHS: 49
breakdown:
   depth: 1, occurrence: 46
   depth: 2, occurrence: 3
XXX times a pointer is dereferenced on LHS: 75
breakdown:
   depth: 1, occurrence: 71
   depth: 2, occurrence: 4
XXX times a pointer is compared with null: 2
XXX times a pointer is compared with address of another variable: 0
XXX times a pointer is compared with another pointer: 2
XXX times a pointer is qualified to be dereferenced: 1781

XXX max dereference level: 3
breakdown:
   level: 0, occurrence: 0
   level: 1, occurrence: 289
   level: 2, occurrence: 14
   level: 3, occurrence: 1
XXX number of pointers point to pointers: 28
XXX number of pointers point to scalars: 74
XXX number of pointers point to structs: 0
XXX percent of pointers has null in alias set: 17.5
XXX average alias set size: 1.18

XXX times a non-volatile is read: 319
XXX times a non-volatile is write: 236
XXX times a volatile is read: 0
XXX    times read thru a pointer: 0
XXX times a volatile is write: 0
XXX    times written thru a pointer: 0
XXX times a volatile is available for access: 0
XXX percentage of non-volatile access: 100

XXX forward jumps: 1
XXX backward jumps: 1

XXX stmts: 114
XXX max block depth: 5
breakdown:
   depth: 0, occurrence: 7
   depth: 1, occurrence: 7
   depth: 2, occurrence: 14
   depth: 3, occurrence: 18
   depth: 4, occurrence: 27
   depth: 5, occurrence: 41

XXX percentage a fresh-made variable is used: 22.7
XXX percentage an existing variable is used: 77.3
********************* end of statistics **********************/