diff options
-rw-r--r-- | testsuites/sptests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/sptests/sp34/changepri.c | 6 | ||||
-rw-r--r-- | testsuites/sptests/sp35/priinv.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index ce996db389..68ced116d9 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,8 @@ +2009-06-18 Chris Johns <chrisj@rtems.org> + + * sp35/priinv.c, sp35/priinv.c: Declare unions volatile to + workaround the H8300 gcc bug. + 2009-06-12 Joel Sherrill <joel.sherrill@OARcorp.com> * sp54/init.c: Fix spacing. diff --git a/testsuites/sptests/sp34/changepri.c b/testsuites/sptests/sp34/changepri.c index 16e1574919..d5571bb4a7 100644 --- a/testsuites/sptests/sp34/changepri.c +++ b/testsuites/sptests/sp34/changepri.c @@ -41,17 +41,17 @@ const char *CallerName(void) sprintf( buffer, "0x%08x -- %d", rtems_task_self(), _Thread_Executing->current_priority ); #else - union { + volatile union { uint32_t u; unsigned char c[4]; } TempName; - + #if defined(TEST_ON_RTEMS_45) TempName.u = *(uint32_t *)_Thread_Executing->Object.name; #else TempName.u = _Thread_Executing->Object.name.name_u32; #endif - sprintf( buffer, "%c%c%c%c -- %d", + sprintf( buffer, "%c%c%c%c -- %d", TempName.c[0], TempName.c[1], TempName.c[2], TempName.c[3], _Thread_Executing->current_priority ); diff --git a/testsuites/sptests/sp35/priinv.c b/testsuites/sptests/sp35/priinv.c index a78b3ceb6d..2289bfea75 100644 --- a/testsuites/sptests/sp35/priinv.c +++ b/testsuites/sptests/sp35/priinv.c @@ -83,7 +83,7 @@ const char *CallerName(void) sprintf( buffer, "0x%08x -- %d", rtems_task_self(), _Thread_Executing->current_priority ); #else - union { + volatile union { uint32_t u; unsigned char c[4]; } TempName; |