minor updates in synthetic tests

This commit is contained in:
Daniel Marjamäki 2016-11-04 22:15:41 +01:00
parent 8e8194ee0f
commit f5046959b3
1 changed files with 20 additions and 20 deletions

View File

@ -2,48 +2,48 @@
int TestData[10];
int global;
void test_global() {
void global() {
global = 1000;
TestData[global] = 0;
TestData[global] = 0; // BUG
}
int global_array[10];
void test_global_array() {
void global_array() {
global_array[3] = 1000;
TestData[global_array[3]] = 0;
TestData[global_array[3]] = 0; // BUG
}
int *global_pointer;
void test_global_pointer() {
void global_pointer() {
*global_pointer = 1000;
TestData[*global_pointer] = 0;
TestData[*global_pointer] = 0; // BUG
}
void test_local() {
void local() {
int local;
local = 1000;
TestData[local] = 0;
TestData[local] = 0; // BUG
}
void test_local_array() {
void local_array() {
int local_array[10];
local_array[3] = 1000;
TestData[local_array[3]] = 0;
TestData[local_array[3]] = 0; // BUG
}
void test_local_alias_1() {
void local_alias_1() {
int local;
int *local_alias = &local;
*local_alias = 1000;
TestData[*local_alias] = 0;
TestData[*local_alias] = 0; // BUG
}
void test_local_alias_2() {
void local_alias_2() {
int local;
int *local_alias = &local;
local = 1000;
TestData[*local_alias] = 0;
TestData[*local_alias] = 0; // BUG
}
struct ABC {
@ -52,17 +52,17 @@ struct ABC {
int c;
};
void test_struct_member_init() {
void struct_member_init() {
struct ABC abc = {1000,{0},3};
TestData[abc.a] = 0;
TestData[abc.a] = 0; // BUG
}
void test_struct_member_assign(struct ABC *abc) {
void struct_member_assign(struct ABC *abc) {
abc->a = 1000;
TestData[abc->a] = 0;
TestData[abc->a] = 0; // BUG
}
void test_struct_arraymember(struct ABC *abc) {
void struct_arraymember(struct ABC *abc) {
abc->b[3] = 1000;
TestData[abc->b[3]] = 0;
TestData[abc->b[3]] = 0; // BUG
}