diff options
author | marcel <marcel@FreeBSD.org> | 2005-01-27 23:11:55 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2005-01-27 23:11:55 +0000 |
commit | c8ad56a37f143b5e763b7baa3f492edb03162e7d (patch) | |
tree | 99484682079eb32ca433c81504dcba8c1776ff2b /tools/regression | |
parent | 8c11911620c334e21c9f9b60b778ef10b9ab4282 (diff) | |
download | FreeBSD-src-c8ad56a37f143b5e763b7baa3f492edb03162e7d.zip FreeBSD-src-c8ad56a37f143b5e763b7baa3f492edb03162e7d.tar.gz |
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.
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/ia64/unaligned/test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/regression/ia64/unaligned/test.c b/tools/regression/ia64/unaligned/test.c index dc406b1..e6c8bb4 100644 --- a/tools/regression/ia64/unaligned/test.c +++ b/tools/regression/ia64/unaligned/test.c @@ -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"); |