X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Ftests%2Fstaticinit.c;h=4f03698eb08d584cfec2571079f7083d5549d01d;hb=55250da7ff51808e9785e3eff75748ee47cc98d1;hp=c9532b5515c2bdcb9ad15df5eea94cd760a6f557;hpb=df006cf4055614dd399c238c1f65e13def2d791b;p=fw%2Fsdcc diff --git a/support/regression/tests/staticinit.c b/support/regression/tests/staticinit.c index c9532b55..4f03698e 100644 --- a/support/regression/tests/staticinit.c +++ b/support/regression/tests/staticinit.c @@ -3,6 +3,7 @@ type: char, int, long */ + #include static {type} smallDense[] = { @@ -20,8 +21,8 @@ testSmallDense(void) ASSERT(smallDense[5] == 6); } -#ifdef __mcs51 -idata +#ifdef SDCC_mcs51 +idata at 0xa0 /* leave space for the stack */ #endif static {type} smallSparse[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -41,8 +42,8 @@ testSmallSparse(void) ASSERT(smallSparse[8] == 1); } -#ifdef __mcs51 -idata +#ifdef SDCC_mcs51 +idata at 0xd0 #endif static {type} smallSparseZero[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -64,10 +65,15 @@ testSmallSparseZero(void) ASSERT(smallSparseZero[6] == 0); ASSERT(smallSparseZero[7] == 0); ASSERT(smallSparseZero[8] == 0); + + // Make the compiler happy + ASSERT(smallSparseZeroTail[0] == 1); } -#ifdef __mcs51 +#ifdef SDCC_mcs51 xdata +#elif SDCC_pic16 +code #endif static {type} largeMixed[] = { 1, 2, 3, 4, 5, 6, 7, /* 0-6 */