System Error: Working register allocation failure

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

System Error: Working register allocation failure

Post by Jon Chandler » Fri Jan 22, 2016 9:06 pm

I'm having a strange problem. I'm making some changes to some old code, and I replaced a block of code in the main program loop with some revised code in an existing subroutine.

When I attempted to compile it, I got the error:

System Error: Working register allocation failure

I tried a few things, and then I discovered just commenting out the existing section of code (with curly brackets) and making no other changes resulted in the same problem.

Simply deleting that section with no other changes results in the same problem, and "undoing" it doesn't clear it up.


The program isn't that large (6643 program bytes from a possible 32768, 191 variable bytes from a possible 1536) on an 18F25K22.

Any ideas for this strange behavior?
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Re: System Error: Working register allocation failure

Post by David Barker » Sat Jan 23, 2016 10:26 am

You will need to post some code...

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: System Error: Working register allocation failure

Post by Jon Chandler » Sat Jan 23, 2016 4:03 pm

Thanks David. Let me work with it and see what i can do. The code is 24 printed pages and because of the nature of the problem, i don't think i can post just a snipet that will demonstrate the problem.

The block of code causing the issue contains a number of IF/THEN statements nested inside an IF/THEN statement. I experimented a little with it... if I leave at least one IF/THEN block inside the larger IF/THEN block, the code will compile. Which one of several doesn't matter, but commenting them all out results in this error.

Any pointers on just what this error means? The type of thing that can cause it?

Thanks,

Jon
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Re: System Error: Working register allocation failure

Post by David Barker » Sat Jan 23, 2016 6:05 pm

You should not normally see this error - it's a compiler allocation problem with RAM. The only solution is reworking code but without seeing anything there isn't much I can offer in terms of help.

Post Reply