Make the local variables global so that the compiler cannot assume

too much about them. This prevents certain peephole optimizations
at -O that invalidate the tests.
This commit is contained in:
marcel 2005-01-27 23:11:55 +00:00
parent 83f8c25619
commit fa3c9df4c7

View File

@ -91,18 +91,19 @@
# endif
#endif
static struct {
struct {
DATA_TYPE aligned;
char _;
char misaligned[sizeof(DATA_TYPE)];
} data;
DATA_TYPE *aligned = &data.aligned;
DATA_TYPE *misaligned = (DATA_TYPE *)data.misaligned;
DATA_TYPE value = DATA_VALUE;
int
main()
{
DATA_TYPE *aligned = &data.aligned;
DATA_TYPE *misaligned = (DATA_TYPE *)data.misaligned;
DATA_TYPE value = DATA_VALUE;
/* Set PSR.ac. */
asm volatile("sum 8");