Jump to content
Sign in to follow this  
Smache

Boostc1.6_1.7.2 Ram Alocation Bug

Recommended Posts

Bug description:

Only bit 0 and bit 7 of a GPR are alocated to bit variables.

 

Steps to reproduce:

#include <system.h>

 

bit bFlag0;

bit bFlag1;

bit bFlag2;

bit bFlag3;

bit bFlag4;

bit bFlag5;

bit bFlag6;

bit bFlag7;

 

void main()

{

 

}

 

Compile and look at generated asm file. You'll see that:

 

gbl_bFlag0 EQU 0x0000000C ; bit:0

gbl_bFlag1 EQU 0x0000000C ; bit:7

gbl_bFlag2 EQU 0x0000000D ; bit:0

gbl_bFlag3 EQU 0x0000000D ; bit:7

gbl_bFlag4 EQU 0x0000000E ; bit:0

gbl_bFlag5 EQU 0x0000000E ; bit:7

gbl_bFlag6 EQU 0x0000000F ; bit:0

gbl_bFlag7 EQU 0x0000000F ; bit:7

 

Expected behavior:

The eight bit variables should use only 1 byte of RAM not 4.

 

Is the problem 100% reproduceable:

Every time.

 

IDE version: SourceBoost Version 5.7

Compiler: BoostC for PIC16

Compiler version: 1.7.2

Target device: PIC16f84A

OS: Windows XP

Share this post


Link to post
Share on other sites

Smache,

 

Good one :(

I'm suprise no one else has noticed this before now.

 

Now fixed. Available in the next release.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...