Imran Ahmed

COMPILER BUG?? StarCore C++ Compiler v2.7 Engineering Build 17a Freescale Production

Discussion created by Imran Ahmed Employee on Feb 20, 2006
Latest reply on Feb 21, 2006 by Imran Ahmed
I'm using the following compiler version:
 
===============
StarCore C++ Compiler v2.7 Engineering Build 17a Freescale Production
Delivery scc-1-107, Compiled date Jul 21 2005 12:43:13
Copyright (c) 2005 by Freescale Semiconductor, Inc, All Rights Reserved
===============
 
 
I get this error message when I try and compile the code shown below:
 
===============
[ASM,2,5999,98,listing_4_5.sl]: ERROR --- Symbol re-defined: _L10
[ASM,2,5999,180,listing_4_5.sl]: ERROR --- Symbol re-defined: _L10
[SCC,2,1027,-1]:Non-zero return status from "C:\Program Files\Metrowerks\CodeWarrior\Starcore_Support\Compiler\bin\asmsc100.exe".
===============
 
 
I try and compile the following code (from Listing 4.5 in Metrowers CodeWarrior Help System):
 
===============
/************Listing 4.5************/
 
#include <stdio.h>
char sample[10] = {9,6,7,1,0,5,1,8,2,6};
int status;
 
asm char t7(int p)
{
asm_header
 .arg
   _p in $d7;
return in $d8;
 .reg $d7,$d8,$r1;
asm_body
 
   clr      d8               move.l   #_sample,r1       doen3 d7
   dosetup3 _L10
   loopstart3
_L10:
   move.b   (r1),d1
   add      d8,d1,d8
   inc      d1
   move.b   d1,(r1)+
   loopend3
asm_end
}
 
int main()
{
   int m = 8;
   int s,i;
 
   for(i=0;i < 10;i++) {
       sample[i] *= 2;
       printf("%d ",sample[i]);
   }
   printf("\n");
   s = (int)t7(m);
   printf("S= %d\n",s);
 
   for(i=0;i < 10;i++)
       printf("%d ",sample[i]);
   printf("\n");
   return 1;
}
/********************************/
===============
 
Please let me know if this is a known bug, or solution to work around this problem.
 
Thanks,
-imran

Outcomes