Compiling the following code:
void main(void)
{
volatile int* dly = (void*)0xdead;
unsigned int i;
for(i=0;i<32768+4;i++)
{
*dly=0;
}
}
compile using: "cl55 -ml -O2 -k test.c"
Gives the following assembler error
[test.c]
"test.asm", ERROR! at line 60: [E9999] Syntax Error
RPT #-32765
"test.asm", ERROR! at line 60: [E9999] Invalid instructionsyntax, CSR,
Immediate: 8-bit unsigned, Immediate:
16-bit signed, Smem expected
RPT #-32765
"test.asm", ERROR! at line 60: [E9999] Trailing operands or input specified
RPT #-32765
"test.asm", ERROR! at line 60: [E9999] Failed operand constraints
RPT #-32765
4 Assembly Errors, No Assembly Warnings
Errors in Source - Assembler Aborted
>> Compilation failure
>> Compilation failure
Note that if we init dly with 0 "magically" solves the problems because a rptblock is created instead of rpt, never the less the compiler should not generate code the assembler does not understand.
Test with version 4.4.0