[rtems commit] ada/sp04: Fix test failure due to compiler opti

Sebastian Huber sebh at rtems.org
Thu Feb 22 15:43:15 UTC 2018


Module:    rtems
Branch:    master
Commit:    0d44e251d9b1392076953e533329450d79e5ecad
Changeset: http://git.rtems.org/rtems/commit/?id=0d44e251d9b1392076953e533329450d79e5ecad

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb 22 16:37:26 2018 +0100

ada/sp04: Fix test failure due to compiler opti

The SPTEST.RUN_COUNT must be volatile since it is changed outside of the
procedure scope by the thread switch extension.

---

 testsuites/ada/sptests/sp04/sptest.ads | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testsuites/ada/sptests/sp04/sptest.ads b/testsuites/ada/sptests/sp04/sptest.ads
index 36f1202..7033eb5 100644
--- a/testsuites/ada/sptests/sp04/sptest.ads
+++ b/testsuites/ada/sptests/sp04/sptest.ads
@@ -45,6 +45,7 @@ package SPTEST is
 --
 
    RUN_COUNT : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.UNSIGNED32;
+   pragma Volatile (RUN_COUNT);
 
 --
 --  INIT




More information about the vc mailing list