synthetic test: fix compiler errors

This commit is contained in:
Daniel Marjamäki 2016-11-07 09:30:17 +01:00
parent ea087e6188
commit 684e78f54e
1 changed files with 23 additions and 23 deletions

View File

@ -1,49 +1,49 @@
int TestData[10]; int TestData[10];
int global; int g;
void global() { void global() {
global = 1000; g = 1000;
TestData[global] = 0; // BUG TestData[g] = 0; // BUG
} }
int global_array[10]; int garr[10];
void global_array() { void global_array() {
global_array[3] = 1000; garr[3] = 1000;
TestData[global_array[3]] = 0; // BUG TestData[garr[3]] = 0; // BUG
} }
int *global_pointer; int *gp;
void global_pointer() { void global_pointer() {
*global_pointer = 1000; *gp = 1000;
TestData[*global_pointer] = 0; // BUG TestData[*gp] = 0; // BUG
} }
void local() { void local() {
int local; int x;
local = 1000; x = 1000;
TestData[local] = 0; // BUG TestData[x] = 0; // BUG
} }
void local_array() { void local_array() {
int local_array[10]; int arr[10];
local_array[3] = 1000; arr[3] = 1000;
TestData[local_array[3]] = 0; // BUG TestData[arr[3]] = 0; // BUG
} }
void local_alias_1() { void local_alias_1() {
int local; int x;
int *local_alias = &local; int *p = &x;
*local_alias = 1000; *p = 1000;
TestData[*local_alias] = 0; // BUG TestData[*p] = 0; // BUG
} }
void local_alias_2() { void local_alias_2() {
int local; int x;
int *local_alias = &local; int *p = &x;
local = 1000; x = 1000;
TestData[*local_alias] = 0; // BUG TestData[*p] = 0; // BUG
} }
struct ABC { struct ABC {