public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Thomas dot Koenig at online dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/19032] New: modulo generates wrong result
Date: Thu, 16 Dec 2004 11:28:00 -0000	[thread overview]
Message-ID: <20041216112828.19032.Thomas.Koenig@online.de> (raw)

$ cat mod-neg.f90
  integer :: a,b
  a = 2
  b = -1
  print *,modulo(2,-1)
  print *,modulo(a,b)
end
$ gfortran mod-neg.f90 && ./a.out
           0
          -1
$ gfortran -v
Reading specs from /home/zfkts/lib/gcc/ia64-unknown-linux-gnu/4.0.0/specs
Configured with: ../gcc-4.0-20041212/configure --prefix=/home/zfkts
--enable-languages=c,c++,f95 : (reconfigured) ../gcc-4.0-20041212/configure
--prefix=/home/zfkts --enable-languages=c,c++,f95 --disable-shared
Thread model: posix
gcc version 4.0.0 20041212 (experimental)

It's a bit strange that the first result is correct, and the
second one isn't.

-- 
           Summary: modulo generates wrong result
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot Koenig at online dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


             reply	other threads:[~2004-12-16 11:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16 11:28 Thomas dot Koenig at online dot de [this message]
2004-12-16 11:29 ` [Bug libfortran/19032] " Thomas dot Koenig at online dot de
2004-12-16 14:30 ` tobi at gcc dot gnu dot org
2004-12-16 14:41 ` [Bug libfortran/19032] modulo generates wrong result for divisor -1 tobi at gcc dot gnu dot org
2004-12-16 14:42 ` tobi at gcc dot gnu dot org
2004-12-16 22:40 ` Thomas dot Koenig at online dot de
2004-12-17  1:18 ` tobi at gcc dot gnu dot org
2004-12-17 14:29 ` [Bug libfortran/19032] modulo generates wrong result for divisor 1 and -1 Thomas dot Koenig at online dot de
2004-12-20 19:08 ` tobi at gcc dot gnu dot org
2004-12-20 19:56 ` tobi at gcc dot gnu dot org
2004-12-27 17:13 ` cvs-commit at gcc dot gnu dot org
2004-12-27 17:14 ` tobi at gcc dot gnu dot org
2004-12-27 17:16 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041216112828.19032.Thomas.Koenig@online.de \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).