aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/036.sh
blob: 2a60cf96adfc397c2dc185e71a123ea36f380ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set -e

cat <<'EOF' > expected
42
EOF
bash ../../test_diff.sh <<'EOF'
void* calloc();
int printf();

struct T;

struct S {
    struct T* a;
};

struct T {
    int b;
};

int main() {
    struct S* s = calloc(1, sizeof(struct S));
    s->a = calloc(1, sizeof(struct T));
    s->a->b = 42;
    printf("%d\n", s->a->b);
    return 0;
}
EOF