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:
parent
0335d35b09
commit
ced1bf58df
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user