ROBOTC.net forums
http://www.robotc.net/forums/

Internal Compiler errors in v3.51
http://www.robotc.net/forums/viewtopic.php?f=63&t=4900
Page 1 of 1

Author:  bobatk [ Wed Sep 26, 2012 12:15 am ]
Post subject:  Internal Compiler errors in v3.51

Compiling the first attached file produces the following errors:

**Severe*:Internal Debug: Bad 'parmSourceStackULongVar' result from 'Dereferencing' point
**Severe*:Internal Debug: Bad 'parmSourceStackULongVar' result from 'Dereferencing' point
**Severe*:Internal Debug: Bad 'parmSourceStackULongVar' result from 'Dereferencing' point
**Error**:Internal Compiler: Bad temp index in releasing temporary. S001C. Allocation Index 4/14 Pass/Seq: Assign Addresses:22(alloc 17)
**Error**:Internal Compiler: Bad temp index in releasing temporary. S0020. Allocation Index 8/16 Pass/Seq: Emit Code:18(alloc 16)

I suspect that this is not by design. I've been unable to find a work around by, e.g., making PControllerOfMotor and PMtrOf functions rather than macros. Indeed, if one does that (see the second attached file), one gets the following errors:

File "v3.51 internal compiler bugs - function.c" compiled on Sep 25 2012 21:13:31
**Error**:Internal Compiler: Bad code generation when 'dereferencing' pointer operand 'fcnReturn(slong)'
**Severe*:Internal Debug: Bad 'parmSourceFunctionReturnValueSLong' result from 'Dereferencing' point
**FATAL**:Compiler error. Failed to release 'stack' allocated temporary variables 4(8) to 11. Pass 'Emit Code:11'
**Error**:Internal Compiler: Bad code generation when 'dereferencing' pointer operand 'fcnReturn(slong)'
**Severe*:Internal Debug: Bad 'parmSourceFunctionReturnValueSLong' result from 'Dereferencing' point
**Error**:Dereference operator is not valid on a non-pointer variable [2]
**Error**:Invalid (i.e. undefined) storage location for expression result
**Error**:Internal Compiler: Bad code generation when 'dereferencing' pointer operand 'fcnReturn(slong)'
**Severe*:Internal Debug: Bad 'parmSourceFunctionReturnValueSLong' result from 'Dereferencing' point
**Error**:Internal Compiler: Bad code generation when 'dereferencing' pointer operand 'fcnReturn(slong)'
**Severe*:Internal Debug: Bad 'parmSourceFunctionReturnValueSLong' result from 'Dereferencing' point
**Error**:Dereference operator is not valid on a non-pointer variable [2]
**Error**:Invalid (i.e. undefined) storage location for expression result

FWIW: This is RobotC v3.51 running on Win7 64 bit, with a platform type of NXT + Tetrix/Matrix. These bugs are currently stalling our team's migration to 3.51 (though 3.08 does still seem to work for us).

Attachments:
v3.51 internal compiler bugs - function.c [4.62 KiB]
Downloaded 578 times
v3.51 internal compiler bugs.c [4.41 KiB]
Downloaded 553 times

Author:  MHTS [ Wed Sep 26, 2012 7:30 pm ]
Post subject:  Re: Internal Compiler errors in v3.51

This sound like bug #8 I reported.
viewtopic.php?f=63&t=4882
I think the RobotC folks are working on it. My team is blocked on this too. In the meantime, I am exploring workarounds for this issue. One thing I am thinking of experimenting is that if I assume the issue is with macros, we could rewrite the macros to be functions instead. I am going to try that tonight and see if that will avoid this bug completely.

Author:  tfriez [ Wed Sep 26, 2012 11:08 pm ]
Post subject:  Re: Internal Compiler errors in v3.51

This is very similar to the issue the MHTS posted previously.

We're currently working on a resolution and will be releasing a BETA (private first, then public) within the next one to two weeks to resolve the issue.

If you wish to receive the private BETAs, please e-mail me at tfriez (at) robotc [dot] net

Thanks!

Author:  MHTS [ Thu Sep 27, 2012 1:46 pm ]
Post subject:  Re: Internal Compiler errors in v3.51

BTW, I was able to avoid bug 8 converting the offending macros into functions. However, after playing with it some more I found Bug 9 (viewtopic.php?f=63&t=4910). But it's a warning and seems to still work correctly. So I think I am unblocked for now (until I found the next blocking bug :) )

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/