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 Moolenaar 2005-01-27 23:11:55 +00:00
parent 0335d35b09
commit ced1bf58df

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");