Przemyslaw Czerpak wrote:
Look at $2 expression in FOR TO / NEXT statement. It was reduced and removed
inside hb_compExprUseAssign() and later reused.
I've just committed the fix though it's rather workaround which simply
keep untouched left side of assign expression and only change/remove
the right side so $2 in FOR TO / NEXT grammar code is left unchanged.

Great! This $2 was my guess! :)

 if( $<asExpr>8 )
 {
    ...
 }
 else
 {
    iSign = 1;
    HB_COMP_EXPR_CLEAR( hb_compExprGenPush(
       hb_compExprNewPreInc( $2, HB_COMP_PARAM ), HB_COMP_PARAM ) );
                             ^^^
 }


BTW, I'm almost sure my previous GPF is caused by the same optimization. At GPF I was able to see the last compiled line (hundreds only):
-----------------------------
Compiling 'takas.prg'...
2800
-----------------------------
The exact line of FOR nI := nI + 1 TO ... code is 2848, so, I'm sure it's the same bug.

Thank You, for quick fix.


Regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to