Commit 8c27f4c5 authored by Michael Beck's avatar Michael Beck
Browse files

add example for constant load replacementx

[r22110]
parent 5fa209c4
static const int arr[] = { 1, 2, 3 };
static int func1(void) {
return arr[1];
}
static const struct X { int a, b[2]; } data[] = { {1,{2, 3}}, {4,{5, 6}} };
static int func2(void) {
return *data[1].b;
}
static const int darr[][2] = { {1,2}, {2,3} };
static int func3(void) {
return darr[1][1];
}
int main(int argc, char *argv[]) {
return func1() + func2() + func3() != 10;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment