public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27116]  New: Incorrect integer division (wrong sign).
@ 2006-04-11 10:28 laurent at komite dot net
  2006-04-11 10:47 ` [Bug c/27116] [4.2 Regression] " rguenth at gcc dot gnu dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: laurent at komite dot net @ 2006-04-11 10:28 UTC (permalink / raw)
  To: gcc-bugs

The following test demonstrates an incorrect sign in the following division :

#include <stdio.h>

int main (void)
{
    volatile long int n;
    n = -2;

    printf ("%ld\n", (-2147483647L - 1L) / (-n));
    return 0;
}

I get a correct result with 4.0.3, and a wrong sign with snapshots 20060325 and
20060408. Also reported in debian : 

http://bugs.debian.org/361883


-- 
           Summary: Incorrect integer division (wrong sign).
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurent at komite dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27116


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2006-06-16 14:57 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 10:28 [Bug c/27116] New: Incorrect integer division (wrong sign) laurent at komite dot net
2006-04-11 10:47 ` [Bug c/27116] [4.2 Regression] " rguenth at gcc dot gnu dot org
2006-04-11 15:06 ` laurent at komite dot net
2006-04-11 15:16 ` vincent at vinc17 dot org
2006-04-11 15:25 ` rguenth at gcc dot gnu dot org
2006-04-11 15:46 ` vincent at vinc17 dot org
2006-04-11 15:50 ` vincent at vinc17 dot org
2006-04-11 15:55 ` guillaume dot melquiond at ens-lyon dot fr
2006-04-12  1:14 ` pinskia at gcc dot gnu dot org
2006-04-12  5:28 ` guillaume dot melquiond at ens-lyon dot fr
2006-05-02 10:23 ` rguenth at gcc dot gnu dot org
2006-05-08  7:58 ` [Bug middle-end/27116] " pinskia at gcc dot gnu dot org
2006-06-04 18:25 ` mmitchel at gcc dot gnu dot org
2006-06-07 15:45 ` rguenth at gcc dot gnu dot org
2006-06-07 15:58 ` patchapp at dberlin dot org
2006-06-07 19:32 ` rguenth at gcc dot gnu dot org
2006-06-08  3:01 ` patchapp at dberlin dot org
2006-06-08  6:55 ` guillaume dot melquiond at ens-lyon dot fr
2006-06-08  7:32 ` vincent at vinc17 dot org
2006-06-08  8:36 ` rguenth at gcc dot gnu dot org
2006-06-08  8:49 ` rguenth at gcc dot gnu dot org
2006-06-08  8:51 ` rguenth at gcc dot gnu dot org
2006-06-09 13:14 ` patchapp at dberlin dot org
2006-06-16 14:57 ` rguenth at gcc dot gnu dot org
2006-06-16 15:09 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).