#142 Fix for bug #2805333

closed-accepted
Maarten Brock
None
5
2009-08-29
2009-08-13
RvS
No

Attached is a fix for the crash described in #2805333. It contains a small change in m51's gen.c and a test to be added to the tests. I do not have the environment currently to run the test-suite, so I couldn't do a full regression check; likewise I coud not test I added to the patch. But I tested a number of cases by hand and they all produced correct assembly code.

Please integrate,

Regards
Ruud

Discussion

  • Maarten Brock
    Maarten Brock
    2009-08-13

    Instead of looking directly at aop->aopu.aop_dir I think it's probably better to check for IS_OP_RUONLY (oper). I haven't checked but this is my guess. See also AOP_CRY in aopPut().

    Maarten

     
  • RvS
    RvS
    2009-08-15

    Maarten,

    I'll look into that, once my sdcc is compiling again..;-(,
    but what about the counterexample in aopPutUsesAcc:
    gen.c(1475) return (!aop->aopu.aop_dir || strcmp(s, aop->aopu.aop_dir));

     
  • RvS
    RvS
    2009-08-20

     
    Attachments
  • RvS
    RvS
    2009-08-20

    Code updated as indicated by Maarten. Please integrate.

    Ruud

     
  • Maarten Brock
    Maarten Brock
    2009-08-29

    Applied in SDCC 2.9.2 #5508.
    Thanks.

     
  • Maarten Brock
    Maarten Brock
    2009-08-29

    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-accepted