~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/fuzz/1.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This is a RANDOMLY GENERATED PROGRAM.
 
3
 *
 
4
 * Generator: csmith 2.2.0
 
5
 * Git version: a8697aa
 
6
 * Options:   --no-volatiles --no-math64 --max-block-depth 2 --max-block-size 2 --max-expr-complexity 2 --max-funcs 2
 
7
 * Seed:      1880513882
 
8
 */
 
9
 
 
10
#include "csmith.h"
 
11
 
 
12
 
 
13
static long __undefined;
 
14
 
 
15
/* --- Struct/Union Declarations --- */
 
16
union U0 {
 
17
   int32_t  f0;
 
18
   int8_t  f1;
 
19
   const int8_t  f2;
 
20
};
 
21
 
 
22
/* --- GLOBAL VARIABLES --- */
 
23
static uint32_t g_4 = 9UL;
 
24
static int32_t g_6 = 0xB9DD952EL;
 
25
static const int32_t *g_5 = &g_6;
 
26
static union U0 g_7[3][9][6] = {{{{-8L},{5L},{0x901516EAL},{7L},{7L},{0x901516EAL}},{{0x520EA0C8L},{0x520EA0C8L},{0x0920A6FFL},{0x0021FBB9L},{0x888C5540L},{-8L}},{{0xDC87A9B6L},{0x42B48371L},{8L},{7L},{-8L},{0x0920A6FFL}},{{-1L},{0xDC87A9B6L},{8L},{5L},{0x520EA0C8L},{-8L}},{{-3L},{5L},{0x0920A6FFL},{0x865B49D5L},{0xDC87A9B6L},{0x901516EAL}},{{0x865B49D5L},{0xDC87A9B6L},{0x901516EAL},{0x0021FBB9L},{-1L},{-1L}},{{0x865B49D5L},{0x42B48371L},{0x42B48371L},{0x865B49D5L},{-3L},{0x0920A6FFL}},{{-3L},{0x520EA0C8L},{0x0021FBB9L},{5L},{0x865B49D5L},{-1L}},{{-1L},{5L},{0L},{7L},{0x865B49D5L},{0x901516EAL}}},{{{0xDC87A9B6L},{0x520EA0C8L},{7L},{0x0021FBB9L},{-3L},{-8L}},{{0x520EA0C8L},{0x42B48371L},{5L},{7L},{-1L},{0x0920A6FFL}},{{-8L},{0xDC87A9B6L},{5L},{5L},{0xDC87A9B6L},{-8L}},{{0x888C5540L},{5L},{7L},{0x865B49D5L},{0x520EA0C8L},{0x901516EAL}},{{7L},{0xDC87A9B6L},{0L},{0x0021FBB9L},{-8L},{-1L}},{{7L},{0x42B48371L},{0x0021FBB9L},{0x865B49D5L},{0x888C5540L},{0x0920A6FFL}},{{0x888C5540L},{0x520EA0C8L},{0x42B48371L},{5L},{7L},{-1L}},{{-8L},{5L},{0x901516EAL},{7L},{7L},{0x901516EAL}},{{0x520EA0C8L},{0x520EA0C8L},{0x0920A6FFL},{0x0021FBB9L},{0x888C5540L},{-8L}}},{{{0xDC87A9B6L},{0x42B48371L},{8L},{7L},{-8L},{0x0920A6FFL}},{{-1L},{0xDC87A9B6L},{8L},{5L},{0x520EA0C8L},{-8L}},{{-3L},{5L},{0x0920A6FFL},{0x865B49D5L},{0xDC87A9B6L},{0x901516EAL}},{{0x865B49D5L},{0xDC87A9B6L},{0x901516EAL},{0x0021FBB9L},{-1L},{-1L}},{{0x865B49D5L},{0x42B48371L},{0x42B48371L},{0x865B49D5L},{-3L},{0x0920A6FFL}},{{-3L},{0x520EA0C8L},{0x0021FBB9L},{5L},{0x865B49D5L},{-1L}},{{-1L},{5L},{0L},{7L},{0x865B49D5L},{0x901516EAL}},{{0xDC87A9B6L},{0x520EA0C8L},{7L},{0x0021FBB9L},{-3L},{-8L}},{{0x520EA0C8L},{0x42B48371L},{5L},{7L},{-1L},{0x0920A6FFL}}}};
 
27
static int32_t g_31 = 1L;
 
28
static uint32_t g_32 = 4294967289UL;
 
29
 
 
30
 
 
31
/* --- FORWARD DECLARATIONS --- */
 
32
static uint16_t  func_1(void);
 
33
static int32_t * func_9(int32_t * p_10, uint16_t  p_11);
 
34
 
 
35
 
 
36
/* --- FUNCTIONS --- */
 
37
/* ------------------------------------------ */
 
38
/* 
 
39
 * reads : g_4 g_5 g_7 g_32
 
40
 * writes: g_5 g_32
 
41
 */
 
42
static uint16_t  func_1(void)
 
43
{ /* block id: 0 */
 
44
    int32_t l_3 = (-1L);
 
45
    if (((safe_unary_minus_func_int16_t_s(l_3)) >= g_4))
 
46
    { /* block id: 1 */
 
47
        int32_t *l_8 = &l_3;
 
48
        g_5 = g_5;
 
49
        (*l_8) ^= (g_7[1][3][2] , 0x44688D23L);
 
50
    }
 
51
    else
 
52
    { /* block id: 4 */
 
53
        int32_t *l_12 = &l_3;
 
54
        int32_t **l_13 = &l_12;
 
55
        (*l_13) = func_9(((*l_13) = l_12), l_3);
 
56
    }
 
57
    return l_3;
 
58
}
 
59
 
 
60
 
 
61
/* ------------------------------------------ */
 
62
/* 
 
63
 * reads : g_32
 
64
 * writes: g_32
 
65
 */
 
66
static int32_t * func_9(int32_t * p_10, uint16_t  p_11)
 
67
{ /* block id: 6 */
 
68
    int32_t *l_14 = &g_6;
 
69
    int32_t *l_15 = &g_7[1][3][2].f0;
 
70
    int32_t *l_16 = &g_6;
 
71
    int32_t *l_17 = &g_6;
 
72
    int32_t *l_18 = &g_6;
 
73
    int32_t *l_19 = &g_6;
 
74
    int32_t *l_20 = &g_6;
 
75
    int32_t *l_21 = &g_6;
 
76
    int32_t *l_22 = &g_6;
 
77
    int32_t *l_23 = &g_7[1][3][2].f0;
 
78
    int32_t l_24[8] = {0xF9F11119L,0xF9F11119L,0xF9F11119L,0xF9F11119L,0xF9F11119L,0xF9F11119L,0xF9F11119L,0xF9F11119L};
 
79
    int32_t *l_25 = &l_24[7];
 
80
    int32_t *l_26 = &l_24[2];
 
81
    int32_t *l_27 = &l_24[2];
 
82
    int32_t *l_28 = &l_24[0];
 
83
    int32_t *l_29 = &g_7[1][3][2].f0;
 
84
    int32_t *l_30[10] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
 
85
    int i;
 
86
    ++g_32;
 
87
    return p_10;
 
88
}
 
89
 
 
90
 
 
91
 
 
92
 
 
93
/* ---------------------------------------- */
 
94
int main (int argc, char* argv[])
 
95
{
 
96
    int i, j, k;
 
97
    int print_hash_value = 0;
 
98
    if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1;
 
99
    platform_main_begin();
 
100
    crc32_gentab();
 
101
    func_1();
 
102
    for (i = 0; i < 3; i++)
 
103
    {
 
104
        for (j = 0; j < 1; j++)
 
105
        {
 
106
            for (k = 0; k < 1; k++)
 
107
            {
 
108
                transparent_crc(g_7[i][j][k].f0, "g_7[i][j][k].f0", print_hash_value);
 
109
                transparent_crc(g_7[i][j][k].f1, "g_7[i][j][k].f1", print_hash_value);
 
110
                if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
 
111
            }
 
112
        }
 
113
    }
 
114
    platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
 
115
    return 0;
 
116
}
 
117