#950 incorrect loop invariant

closed-fixed
Erik Petrich
5
2013-05-25
2005-07-07
Maarten Brock
No

When compiling the attached file for mcs51 with --model-
large it assumes Bfa to be invariant in the loop and
optimizes it out. Evelyn does throw a warning and
another one for unreachable code.

If I change the loop from do{}while to do{} it compiles ok.
model-small is also ok.

SDCC 2.5.1 #1055

sdcc --model-large -c loopbug.c

Discussion

  • Maarten Brock
    Maarten Brock
    2005-07-07

    incorrect loop invariant

     
    Attachments
  • Erik Petrich
    Erik Petrich
    2005-07-23

    Logged In: YES
    user_id=635249

    Fixed in src/SDCCloop 1.46
    (SDCC 2.5.1 #1067)

     
  • Erik Petrich
    Erik Petrich
    2005-07-23

    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed