v7.00 optimized integer division bug

Beta Testing discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

v7.00 optimized integer division bug

#1 Post by janni » 31 Oct 2016 15:45

Just to keep reminding that it'd be good to fix old errors :wink: - optimization of integer division by powers of two still doesn't work correctly for all signed types (short, integer, longint) when dividend is not a multiple of divisor, for example, if int_var=-1 then int_var/8 gives -1 instead of 0.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: v7.00 optimized integer division bug

#2 Post by filip » 01 Nov 2016 17:03

Hi,

Is this the same issue as reported in the link below ?
http://www.cobir.com/quirks.htm

Regards,
Filip.

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: v7.00 optimized integer division bug

#3 Post by janni » 01 Nov 2016 18:02

Hi Filip,

As it happens, yes. Though the list is for PIC, not dsPIC compilers, this issue is common to both.

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 Beta Testing”