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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140919
@ -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