Menu ▾ ▴

#3392 Double negation test fails for mcs51, ds390

closed-fixed
None
MCS51
5
2026-10-22
2022-05-21
No

Recently added test qct/0036-notneg fails for mcs51 and ds390 when enabled in MakeList.

Discussion

  • Philipp Klaus Krause

    I can still reproduce the bug using current [r14409].

     

    Related

    Commit: [r14409]

  • xinfa peng

    xinfa peng - 2026-03-06

    I found that the bug has been fixed in [r16281], but I don't know which part of the code logic corresponds to it, and I want to know.

     

    Related

    Commit: [r16281]


    Last edit: Maarten Brock 2026-10-20
  • Christopher Bazley

    • assigned_to: Christopher Bazley
     
  • Christopher Bazley

    Exact named qct/0036-notneg.c source compiles to a main function returning zero on MCS51 and DS390; generated return instructions were inspected. Runtime execution was unnecessary for this constant return, and was not performed.
    https://godbolt.org/z/jMbhqKvdd

     
  • Maarten Brock

    Maarten Brock - 2026-10-20
    • status: open --> closed-fixed
    • assigned_to: Christopher Bazley --> Philipp Klaus Krause
    • Category: other --> MCS51
     
  • Maarten Brock

    Maarten Brock - 2026-10-20

    @spth fixed this in [r15572] along with bug [#3355].

     

    Related

    Bugs: #3355
    Commit: [r15572]


    Last edit: Maarten Brock 2026-10-20
  • Christopher Bazley

    Added regression test in [r17058]

     

    Related

    Commit: [r17058]

    • Maarten Brock

      Maarten Brock - 2026-10-22

      Why? It was already tested by qct/0036-notneg.c.
      SDCC does not need even longer regression test time.

       
      • Christopher Bazley

        @maartenbrock Sorry for the trouble. I chose to do that because I wanted to follow a consistent methodology, and I did not know at that time how/whether the existing test is run, or how it manifests success or failure. I did not think that regression test time would be significantly affected by such a simple test. I also thought it would be easier to find a regression test named after the bug, for auditing purposes.

        I think that simply deleting sdcc/support/regression/tests/bug-3392.c might leave a coverage gap because of an exclusion renewed in [r16905].

         

        Related

        Commit: [r16905]

  • Christopher Bazley

    [r17069] and [r17070] enables the original regression test for bug #3392 on MCS51 and DS390 and deletes its duplicate, tests/bug-3392.c.

     
    👍
    1

    Related

    Commit: [r17069]
    Commit: [r17070]


    Last edit: Christopher Bazley 2026-10-22
    • Maarten Brock

      Maarten Brock - 2026-10-22

      Thanks, that is exactly how it should be IMHO.
      And good catch that I forgot to reenable the original test.

       

Log in to post a comment.