#464 compiler is not reserving space for a temp variable

closed-works-for-me
Scott Dattalo
5
2013-05-25
2003-02-18
Anonymous
No

Trying to compile the following function:

void
funtion( )
{
unsigned char busy;

wait:
busy = PORTB;
if ( busy & 0x80 )
goto wait;
}

The compilation will pass but the assembly will
generate:
Error [113] Symbol not previously defined (r0x53).

with the following asm code:
; busy = PORTB;
MOVF _PORTB,W
;#CSRC test1.c 11
; if ( busy & 0x80 )
BTFSC r0x53,7
GOTO _00105_DS_

If you add "volatile" or "register" to the "busy"
varialbe declaration you'll still get errors

Error [113] Symbol not previously defined
(_funtion_busy_1_1)

; busy = PORTB;
MOVF _PORTB,W
;#CSRC test2.c 11
; if ( busy & 0x80 )
BTFSC _funtion_busy_1_1,7
GOTO _00105_DS_

I'm using the latest CVS version.
My email is em@uglyduck.ath.cx
Attached are the test files

Discussion

  • ready to test C file for the PIC processors

     
    Attachments
  • Johan Knol
    Johan Knol
    2003-02-24

    • assigned_to: nobody --> sdattalo
     
  • Raphael Neider
    Raphael Neider
    2005-07-22

    Logged In: YES
    user_id=1115835

    Works for me in SDCC 2.5.1 #1062.

     
  • Raphael Neider
    Raphael Neider
    2005-07-22

    • milestone: --> unreproducable
    • status: open --> closed-works-for-me