#464 compiler is not reserving space for a temp variable

closed-works-for-me
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

  • Nobody/Anonymous

    ready to test C file for the PIC processors

     
  • 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
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks