* device/lib/libsdcc.lib,
[fw/sdcc] / support / regression / tests / absolute.c
index 28bfbf8827c900104ed7eb8612ba4008aa7936f4..e8c3b22970c63e423ddbd77a81bded8dab4ce19b 100644 (file)
@@ -4,6 +4,12 @@
 */
 #include <testfwk.h>
 
+typedef struct
+{
+       int a,b;
+} TestStruct;
+
+{mem} volatile at(0xCABC) TestStruct TestVar = {0,0};
 {mem} at(0xCAB7) char u;
 {mem} at(0xCAB7) char x = 'x';
 {mem} at(0xCAB9) char y = 'y';
@@ -15,12 +21,14 @@ void
 testAbsolute(void)
 {
 #if defined(SDCC_mcs51) || defined(SDCC_ds390) || defined(SDCC_hc08)
+  static {mem} at(0xCAB6) char s = 's';
   char {mem} *pC = (char {mem} *)(0xCAB0);
   int  {mem} *pI = (int  {mem} *)(0xCAB0);
 
   ASSERT(u == 'x');
   ASSERT(pC[7] == 'x');
   ASSERT(pC[9] == 'y');
+  ASSERT(pC[6] == 's');
   ASSERT(pI[0] == 0x1234);
 #endif
 }