#2126 gcc-torture-execute-20000731-1 failure


The regression test gcc-torture-execute-20000731-1 times out for mcs51-large on slower systems due to a code generation bug that's appeared as a side-effect of the new for-loop optimization. The loop uses a floating point control variable x that (in model large) is allocated in xdata. For "x++" the iCode generated references x directly for the rvalue rather than generating an iTemp copy of x as it would for "x=x+1". This becomes a problem when the addition iCode is transformed into a call to __fsadd and x becomes the argument of a send iCode (dpl are dph naively loaded from @dptr).

I think this is a bug with the iCode generator, but all of my attempts to fix how the increment/decrement operators get their rvalue operand so that an intermediate iTemp is generated fixes this test on mcs51-large but leads to a few new failures on the ds390 (for example, gcc-torture-execute-921013-1). For the moment I am going to fix mcs51 code generator to handle send with an argument in xdata.


  • Erik Petrich

    Erik Petrich - 2013-01-11
    • milestone: --> fixed
    • status: open --> closed-fixed
  • Erik Petrich

    Erik Petrich - 2013-01-11

    The mcs51 code generator can deal with case now in revision #8376


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks