public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/32393] gfortran - incorrect run time results Date: Wed, 20 Jun 2007 15:43:00 -0000 [thread overview] Message-ID: <20070620154323.26716.qmail@sourceware.org> (raw) In-Reply-To: <bug-32393-10129@http.gcc.gnu.org/bugzilla/> ------- Comment #12 from dominiq at lps dot ens dot fr 2007-06-20 15:43 ------- With the following changes to the original code: [karma] f90/bug% diff -u pr32393.f pr32393_mod.f --- pr32393.f Mon Jun 18 16:46:48 2007 +++ pr32393_mod.f Wed Jun 20 17:40:03 2007 @@ -16,7 +16,7 @@ c+---------------------------------------------------------------------+ character its1*4 character title*72 - integer t +! integer t real cc, ctrans, dprod2, sdb, sdm, $ stdb, stdm, sum, ttt, uf, $ vf, wsf @@ -99,6 +99,7 @@ c| skip second variation if cc matrix = 0 | c+---------------------------------------------------------------------+ call scprod (ns*ns,1,1,cc,cc,sum) + sum = 0 if (sum.le.0.)go to 180 c+---------------------------------------------------------------------+ c| choose appropriate computational routine | @@ -182,8 +183,10 @@ not=6 nvg=3 iprec = 1 - call vr2 ( intp, ivg, ccrans, cc, ns, stdb, stdm, t, - $ k2, nlin, istab ) +! call vr2 ( intp, ivg, ccrans, cc, ns, stdb, stdm, t, +! $ k2, nlin, istab ) + call vr2 ( 0, ivg, ccrans, cc, ns, stdb, stdm, t, + $ 0, 0, 0 ) stop end subroutine clect2 I get with gfortran: [karma] f90/bug% gfc -g -O3 pr32393_mod.f [karma] f90/bug% a.out 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.1600E+02 row 2 0.9000E+01 0.2000E+02 row 3 0.1100E+02 0.1200E+02 0.2600E+02 [karma] f90/bug% gfc -g -O1 pr32393_mod.f [karma] f90/bug% a.out 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.1600E+02 row 2 0.9000E+01 0.2000E+02 row 3 0.1100E+02 0.1200E+02 0.2600E+02 [karma] f90/bug% gfc -g -O1 -ffast-math -funroll-loops pr32393_mod.f [karma] f90/bug% a.out 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.1600E+02 row 2 0.9000E+01 0.2000E+02 row 3 0.1100E+02 0.1200E+02 0.2600E+02 [karma] f90/bug% gfc -g pr32393_mod.f [karma] f90/bug% a.out 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.1600E+02 row 2 0.9000E+01 0.2000E+02 row 3 0.1100E+02 0.1200E+02 0.2600E+02 Note that I have only given some values to variables used in tests (plus set t to real). BTW I do not see (beside obfuscation) the interest of the constructs: jt=t(j2) tt=.5*tt t(j2)=jt where jt and tt are equivalenced! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32393
next prev parent reply other threads:[~2007-06-20 15:43 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-06-18 14:42 [Bug fortran/32393] New: " dir at lanl dot gov 2007-06-18 14:49 ` [Bug fortran/32393] " dir at lanl dot gov 2007-06-18 14:52 ` dominiq at lps dot ens dot fr 2007-06-18 15:05 ` dir at lanl dot gov 2007-06-18 15:29 ` dominiq at lps dot ens dot fr 2007-06-18 16:16 ` burnus at gcc dot gnu dot org 2007-06-18 18:13 ` dir at lanl dot gov 2007-06-18 18:44 ` dominiq at lps dot ens dot fr 2007-06-18 18:46 ` dominiq at lps dot ens dot fr 2007-06-18 21:04 ` burnus at gcc dot gnu dot org 2007-06-19 12:48 ` dominiq at lps dot ens dot fr 2007-06-20 14:15 ` dir at lanl dot gov 2007-06-20 15:43 ` dominiq at lps dot ens dot fr [this message] 2007-06-20 16:21 ` burnus at gcc dot gnu dot org 2007-06-21 12:58 ` dir at lanl dot gov 2007-06-21 13:23 ` dir at lanl dot gov 2007-06-21 16:16 ` dir at lanl dot gov 2007-06-21 16:29 ` dir at lanl dot gov 2007-06-21 16:48 ` burnus at gcc dot gnu dot org 2007-06-21 17:04 ` dominiq at lps dot ens dot fr 2007-06-21 17:14 ` burnus at gcc dot gnu dot org 2007-06-21 20:06 ` dir at lanl dot gov 2007-06-21 20:11 ` dir at lanl dot gov 2007-06-22 9:41 ` burnus at gcc dot gnu dot org 2007-06-22 13:27 ` burnus at gcc dot gnu dot org 2007-06-22 14:28 ` dir at lanl dot gov 2007-06-22 14:32 ` burnus at gcc dot gnu dot org 2007-06-24 10:51 ` dominiq at lps dot ens dot fr 2007-06-24 11:12 ` Andrew Pinski 2007-06-24 11:13 ` pinskia at gmail dot com 2007-06-24 19:28 ` dominiq at lps dot ens dot fr 2007-06-24 19:37 ` Andrew Pinski 2007-06-24 19:37 ` pinskia at gmail dot com 2007-06-24 19:45 ` burnus at gcc dot gnu dot org 2007-06-24 19:52 ` dominiq at lps dot ens dot fr
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=20070620154323.26716.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).