public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kargl at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/42131] Weird translation of DO loops Date: Sat, 21 Nov 2009 16:26:00 -0000 [thread overview] Message-ID: <20091121162631.15877.qmail@sourceware.org> (raw) In-Reply-To: <bug-42131-10053@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from kargl at gcc dot gnu dot org 2009-11-21 16:26 ------- (In reply to comment #0) > To illustrate this with a simple example: > > DO I = M1, M2, M3 > B(I) = A(I) > ENDDO > > would be most easily, and atraightforwardly, implemented as follows: > > IF (M3 > 0 .AND. M1 < M2) GOTO 200 ! Loop executed zero times > IF (M3 < 0 .AND. M1 > M2) GOTO 200 ! Ditto First, I just woke up 10 minutes ago and still have 1/2 of cup of coffee, but the logic above looks wrong. do i = 1, 2, 1 print *, i end do should produce 1 2 Here, we have m1 = 1, m2 = 2, m3 = 1 > IF (M3 > 0 .AND. M1 < M2) GOTO 200 ! Loop executed zero times -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42131
next prev parent reply other threads:[~2009-11-21 16:26 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-11-21 13:58 [Bug fortran/42131] New: " rguenth at gcc dot gnu dot org 2009-11-21 16:26 ` kargl at gcc dot gnu dot org [this message] 2009-11-21 17:33 ` [Bug fortran/42131] " toon at moene dot org 2009-11-21 18:31 ` tkoenig at gcc dot gnu dot org 2009-11-21 19:24 ` rguenth at gcc dot gnu dot org 2009-11-21 21:41 ` toon at moene dot org 2009-11-21 23:07 ` tkoenig at gcc dot gnu dot org 2009-11-21 23:24 ` rguenther at suse dot de 2009-11-21 23:42 ` tkoenig at gcc dot gnu dot org 2009-11-22 10:21 ` toon at moene dot org 2009-11-22 19:04 ` burnus at gcc dot gnu dot org 2009-11-23 21:48 ` tkoenig at gcc dot gnu dot org 2009-11-24 18:04 ` toon at moene dot org 2009-11-26 21:56 ` tkoenig at gcc dot gnu dot org 2009-11-26 22:07 ` kargl at gcc dot gnu dot org 2009-11-26 23:43 ` tkoenig at gcc dot gnu dot org 2009-11-27 8:29 ` burnus at gcc dot gnu dot org 2009-11-27 9:47 ` rguenther at suse dot de 2009-11-27 9:48 ` rguenther at suse dot de 2009-11-28 15:16 ` tkoenig at gcc dot gnu dot org 2009-11-30 7:31 ` tkoenig at gcc dot gnu dot org 2009-11-30 10:10 ` rguenther at suse dot de 2009-11-30 19:16 ` tkoenig at gcc dot gnu dot org 2009-11-30 20:19 ` jvdelisle at gcc dot gnu dot org 2009-11-30 20:36 ` tkoenig at gcc dot gnu dot org 2009-11-30 21:01 ` tkoenig at gcc dot gnu dot org 2009-12-01 9:42 ` rguenther at suse dot de 2009-12-01 18:33 ` jb at gcc dot gnu dot org 2009-12-02 9:23 ` jb at gcc dot gnu dot org 2009-12-04 14:24 ` 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=20091121162631.15877.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).