// Test insertion of structs into arrays alone without reading

type mystruct {
    int a;
    int b;
}

(int ret) f (int recs) {
    if (recs) {
        ret = f(recs - 1);
    } else {
        ret = 0;
    }
}

main {
    mystruct bigarray[];

    mystruct tmp1;
    tmp1.a = 1;
    tmp1.b = 2;

    bigarray[0] = tmp1;
    
    mystruct tmp2;
    tmp2.a = 1;
    // forgot to assign b - should cause warning but not error
    bigarray[f(2) + 1] = tmp2;

}

// Test insertion of structs into arrays alone without reading

type mystruct {
    int a;
    int b;
}

(int ret) f (int recs) {
    if (recs) {
        ret = f(recs - 1);
    } else {
        ret = 0;
    }
}

main {
    mystruct bigarray[];

    mystruct tmp1;
    tmp1.a = 1;
    tmp1.b = 2;

    bigarray[0] = tmp1;
    
    mystruct tmp2;
    tmp2.a = 1;
    // forgot to assign b - should cause warning but not error
    // UNSET-VARIABLE-EXPECTED
    bigarray[f(2) + 1] = tmp2;
}

Annotate test with possible unset variable
Annotate test with possible unset variable

git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@11465 dc4e9af1-7f46-4ead-bba6-71afc04862de
