#306 Struct access code adds a divide by zero

closed-fixed
5
2013-05-25
2002-03-02
No

See the binary search code under this bug number. This code:

uMiddle = (uLeft + uRight)/2;
iDiff = pStates[uMiddle].pBase - p;

generates the code (roughly)
...
i = pStates + uMiddle*4 + offsetof(pBase)
j = i - p
k = j / 0

It is visible in bug.dumpraw0, so seems to be in the front end.

Discussion

  • Johan Knol

    Johan Knol - 2002-03-02

    Logged In: YES
    user_id=63512

    k=j/sizeof(void)

    fixed in SDCCicode.c:1.131

     
  • Johan Knol

    Johan Knol - 2002-03-02
    • milestone: --> fixed
    • assigned_to: nobody --> johanknol
    • status: open --> closed-fixed
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks