From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24205 invoked by alias); 21 Nov 2009 23:24:08 -0000 Received: (qmail 24133 invoked by alias); 21 Nov 2009 23:23:55 -0000 Date: Sat, 21 Nov 2009 23:24:00 -0000 Message-ID: <20091121232355.24132.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42131] Weird translation of DO loops In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg01822.txt.bz2 ------- Comment #7 from rguenther at suse dot de 2009-11-21 23:23 ------- Subject: Re: Weird translation of DO loops On Sat, 21 Nov 2009, tkoenig at gcc dot gnu dot org wrote: > ------- Comment #6 from tkoenig at gcc dot gnu dot org 2009-11-21 23:07 ------- > Created an attachment (id=19076) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19076&action=view) > --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19076&action=view) > proposed patch > > This patch generates > > D.1336 = m1; > D.1337 = m2; > D.1338 = m3; > i = D.1336; > if (D.1338 > 0) > { > if (D.1337 < D.1336) goto L.2; > } > else > { > if (D.1337 > D.1336) goto L.2; > } > countm1.1 = (character(kind=4)) (D.1337 - D.1336) / (character(kind=4)) > D.1338; > while (1) > { > { > > Is this better, or did I overlook anything? That's better. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42131