summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-10 11:58:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-10 12:10:14 +0200
commit9deed9edbf2d75961155c77b4c0e1b545b7d236b (patch)
treee8acf5dd9bb459345948e6524010d0f57050967e
parentarm: Support VFP-D32 and Neon (diff)
downloadrtems-9deed9edbf2d75961155c77b4c0e1b545b7d236b.tar.bz2
libtests/malloc04: Prevent compiler optimizations
-rw-r--r--testsuites/libtests/malloc04/init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuites/libtests/malloc04/init.c b/testsuites/libtests/malloc04/init.c
index 89cbab327f..c1fc2367e1 100644
--- a/testsuites/libtests/malloc04/init.c
+++ b/testsuites/libtests/malloc04/init.c
@@ -41,7 +41,12 @@ void *rtems_heap_null_extend(
#endif
char Malloc_Heap[ 256 ] CPU_STRUCTURE_ALIGNMENT;
-int sbrk_count;
+
+/*
+ * Use volatile to prevent compiler optimizations due to the malloc() builtin.
+ */
+volatile int sbrk_count;
+
Heap_Control TempHeap;
size_t offset;