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 middle-end/42181] [4.5 Regression][graphite] -fgraphite-identity miscompiles air.f90 Date: Tue, 09 Mar 2010 13:32:00 -0000 [thread overview] Message-ID: <20100309133215.12595.qmail@sourceware.org> (raw) In-Reply-To: <bug-42181-11113@http.gcc.gnu.org/bugzilla/> ------- Comment #22 from dominiq at lps dot ens dot fr 2010-03-09 13:32 ------- The following variant of spectop.f90 is miscompiled with '-fgraphite-identity -O3': SUBROUTINE SPECTOP(Dr,N) IMPLICIT REAL*8(A-H,o-Z) DIMENSION d1(0:32,0:32) , Dr(0:32,0:32) , x(0:32) REAL*8 Dr ! ! PROGRAM TO COMPUTE THE CHEBYSHEV SPECTRAL OPERATOR ! ang = DBLE(1) s = DBLE(6) o = DBLE(1) t = DBLE(2) pi = t*DASIN(ang) DO i = 0 , N x(i) = DCOS(pi*DBLE(i)/DBLE(N)) ENDDO ! ! IF J=K ! DO j = 1 , N - 1 d1(j,j) = -x(j)/(t*(o-x(j)**2)) ENDDO d1(0,0) = (t*DBLE(N)**2+o)/s d1(N,N) = -d1(0,0) ! ! IF J.NE.K ! fctr = -t DO j = 1 , N-1 d1(0,j) = fctr/(x(0)-x(j)) fctr = -fctr ENDDO d1(0,N) = fctr/(t*(x(0)-x(N))) fctr1 = -1.0D0 DO k = 1 , N-1 d1(k,0) = fctr1/(t*(x(k)-x(0))) fctr = -fctr1 DO j = 1 , N-1 if (j.ne.k) d1(k,j) = fctr/(x(k)-x(j)) fctr = -fctr ENDDO d1(k,N) = fctr/(t*(x(k)-x(N))) fctr1 = -fctr1 ENDDO d1(N,0) = fctr1/(x(N)-x(0)) fctr = -t*fctr1 DO j = 1 , N-1 d1(N,j) = fctr/(x(N)-x(j)) fctr = -fctr ENDDO DO k = 0 , N DO j = 0 , N Dr(k,j) = d1(N-k,N-j) ENDDO ENDDO CONTINUE END but is correctly compiled if DO j = 1 , N-1 if (j.ne.k) d1(k,j) = fctr/(x(k)-x(j)) fctr = -fctr ENDDO is replaced with DO j = 1 , k-1 d1(k,j) = fctr/(x(k)-x(j)) fctr = -fctr ENDDO fctr = -fctr DO j = k+1 , N-1 d1(k,j) = fctr/(x(k)-x(j)) fctr = -fctr ENDDO -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42181
next prev parent reply other threads:[~2010-03-09 13:32 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-11-26 2:53 [Bug middle-end/42181] New: -fgraphite-identity miscompiles or ICEs on air.f90 howarth at nitro dot med dot uc dot edu 2009-11-26 17:03 ` [Bug middle-end/42181] " jv244 at cam dot ac dot uk 2009-11-26 17:04 ` jv244 at cam dot ac dot uk 2009-11-26 17:05 ` [Bug middle-end/42181] [4.5 Regression] " jv244 at cam dot ac dot uk 2009-11-27 11:32 ` rguenth at gcc dot gnu dot org 2009-12-14 19:03 ` spop at gcc dot gnu dot org 2009-12-14 19:03 ` spop at gcc dot gnu dot org 2009-12-23 7:50 ` spop at gcc dot gnu dot org 2009-12-24 0:14 ` howarth at nitro dot med dot uc dot edu 2009-12-24 0:15 ` howarth at nitro dot med dot uc dot edu 2009-12-24 0:18 ` howarth at nitro dot med dot uc dot edu 2009-12-24 0:20 ` howarth at nitro dot med dot uc dot edu 2009-12-24 8:13 ` dominiq at lps dot ens dot fr 2010-01-14 16:57 ` trifunovic at gcc dot gnu dot org 2010-01-14 19:25 ` spop at gcc dot gnu dot org 2010-02-06 17:44 ` [Bug middle-end/42181] [4.5 Regression][graphite] " spop at gcc dot gnu dot org 2010-03-08 23:09 ` [Bug middle-end/42181] [4.5 Regression][graphite] -fgraphite-identity miscompiles air.f90 howarth at nitro dot med dot uc dot edu 2010-03-08 23:16 ` spop at gcc dot gnu dot org 2010-03-09 2:26 ` howarth at nitro dot med dot uc dot edu 2010-03-09 2:34 ` howarth at nitro dot med dot uc dot edu 2010-03-09 2:35 ` howarth at nitro dot med dot uc dot edu 2010-03-09 2:37 ` howarth at nitro dot med dot uc dot edu 2010-03-09 3:45 ` howarth at nitro dot med dot uc dot edu 2010-03-09 3:49 ` howarth at nitro dot med dot uc dot edu 2010-03-09 13:32 ` dominiq at lps dot ens dot fr [this message] 2010-03-09 22:31 ` spop at gcc dot gnu dot org 2010-03-14 11:40 ` dominiq at lps dot ens dot fr 2010-03-20 10:45 ` dominiq at lps dot ens dot fr 2010-03-21 16:28 ` Sebastian Pop 2010-03-21 16:28 ` sebpop at gmail dot com 2010-03-23 20:08 ` spop at gcc dot gnu dot org 2010-03-23 21:24 ` spop at gcc dot gnu dot org 2010-03-23 21:28 ` spop at gcc dot gnu dot org 2010-03-24 20:18 ` spop at gcc dot gnu dot org 2010-03-24 21:35 ` howarth at nitro dot med dot uc dot edu 2010-03-25 17:43 ` Sebastian Pop 2010-03-26 9:58 ` Richard Guenther 2010-03-25 17:44 ` sebpop at gmail dot com 2010-03-26 9:58 ` rguenther at suse dot de
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=20100309133215.12595.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).