1 // RUN: %clang_safestack %s -o %t
6 // Test that loads/stores work correctly for variables on the unsafe stack.
8 int main(int argc
, char **argv
)
13 // check that we can write to a buffer
14 for (i
= 0; argv
[0][i
] && i
< sizeof (buffer
) - 1; ++i
)
15 buffer
[i
] = argv
[0][i
];
18 break_optimization(buffer
);
20 // check that we can read from a buffer
21 for (i
= 0; argv
[0][i
] && i
< sizeof (buffer
) - 1; ++i
)
22 if (buffer
[i
] != argv
[0][i
])