From 18105b44d94af7cce253165d4bd3d5bbeaf67310 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 17 Jun 2009 22:59:16 +0000 Subject: 2009-06-18 Chris Johns * sp35/priinv.c, sp35/priinv.c: Declare unions volatile to workaround the H8300 gcc bug. --- testsuites/sptests/sp34/changepri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testsuites/sptests/sp34') 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 ); -- cgit v1.2.3