public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/26985] incorrect matmul result Date: Sun, 02 Apr 2006 18:41:00 -0000 [thread overview] Message-ID: <20060402184131.2631.qmail@sourceware.org> (raw) In-Reply-To: <bug-26985-10259@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from tkoenig at gcc dot gnu dot org 2006-04-02 18:41 ------- The test case also exposes a problem with the way that the result is stored. Look at this: $ cat matmul.f90 program main implicit none real(8) :: a(2,9), b(9,7), c(2,7) integer :: i, j a = 1.d0 b = 2.d0 c = 1789789.d0 c(:,1:7:2) = matmul(a,b(:,1:7:2)) do i = 1, 7 print *, c(:,i) end do end program main $ gfortran matmul.f90 && ./a.out 18.0000000000000 18.0000000000000 0.00000000000000 0.00000000000000 18.0000000000000 18.0000000000000 0.00000000000000 0.00000000000000 1789807.00000000 1789807.00000000 1789789.00000000 1789789.00000000 1789807.00000000 1789807.00000000 $ ifort matmul.f90 && ./a.out 18.0000000000000 18.0000000000000 1789789.00000000 1789789.00000000 18.0000000000000 18.0000000000000 1789789.00000000 1789789.00000000 18.0000000000000 18.0000000000000 1789789.00000000 1789789.00000000 18.0000000000000 18.0000000000000 -- tkoenig at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tkoenig at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26985
next prev parent reply other threads:[~2006-04-02 18:41 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-04-02 10:47 [Bug libfortran/26985] New: " fxcoudert at gcc dot gnu dot org 2006-04-02 10:49 ` [Bug libfortran/26985] " fxcoudert at gcc dot gnu dot org 2006-04-02 18:41 ` tkoenig at gcc dot gnu dot org [this message] 2006-04-02 19:21 ` tkoenig at gcc dot gnu dot org 2006-04-29 16:31 ` tkoenig at gcc dot gnu dot org 2006-05-05 11:08 ` fxcoudert at gcc dot gnu dot org 2006-05-05 11:08 ` fxcoudert at gcc dot gnu dot org 2006-05-05 21:34 ` [Bug libfortran/26985] [4.1 only] " fxcoudert at gcc dot gnu dot org 2006-05-07 13:03 ` fxcoudert at gcc dot gnu dot org 2006-05-07 15:50 ` [Bug libfortran/26985] " fxcoudert 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=20060402184131.2631.qmail@sourceware.org \ --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: linkBe 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).