From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10638 invoked by alias); 22 May 2011 18:49:07 -0000 Received: (qmail 10625 invoked by uid 22791); 22 May 2011 18:49:07 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-bw0-f47.google.com (HELO mail-bw0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 May 2011 18:48:42 +0000 Received: by bwz5 with SMTP id 5so5233189bwz.20 for ; Sun, 22 May 2011 11:48:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.154.74 with SMTP id n10mr1453334bkw.33.1306090120886; Sun, 22 May 2011 11:48:40 -0700 (PDT) Received: by 10.204.39.65 with HTTP; Sun, 22 May 2011 11:48:40 -0700 (PDT) In-Reply-To: <4DD92C77.5090107@netcologne.de> References: <4DD92C77.5090107@netcologne.de> Date: Sun, 22 May 2011 20:56:00 -0000 Message-ID: Subject: Re: [patch, fortran] [4.6/4.7 Regression] Fix PR 48955 From: Paul Richard Thomas To: Thomas Koenig Cc: "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01569.txt.bz2 Dear Thomas, I am sorry for the long silence on this PR. I have been up to my eyeballs in daytime work. I have posted a simpler alternative on the PR that uses your suggestion that forward and backward dependences need to to be recorded to get this right. I believe that it's OK but have only now had the opportunity to put it on to regtest. Cheers Paul On Sun, May 22, 2011 at 5:32 PM, Thomas Koenig wrot= e: > Hello world, > > the attached patch fixes PR 48955, a wrong-code regression for 4.6 and 4.= 7, > including the test case from > http://gcc.gnu.org/ml/fortran/2011-05/msg00093.html . =A0It follows the > outline from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48955#c7 . > > Regression-tested. OK for trunk? > > =A0 =A0 =A0 =A0Thomas > > 2011-05-22 =A0Thomas Koenig =A0 > > =A0 =A0 =A0 =A0PR fortran/48955 > =A0 =A0 =A0 =A0* gfortran.h (gfc_reverse): =A0Change to struct with two b= oolean > =A0 =A0 =A0 =A0variables, forward_ok and backward_ok. > =A0 =A0 =A0 =A0* trans-expr.c (gfc_trans_assignment_1): =A0Initialize usi= ng > =A0 =A0 =A0 =A0new gfc_reverse struct. > =A0 =A0 =A0 =A0* trans-array.c (gfc_init_loopinfo): =A0Likewise. > =A0 =A0 =A0 =A0(gfc_trans_scalarized_loop): =A0Use new gfc_reverse. > =A0 =A0 =A0 =A0* dependency.c (gfc_dep_resovler): =A0Use new gfc_reverse. > =A0 =A0 =A0 =A0If a forward dependency is found, a backward dependency is > =A0 =A0 =A0 =A0no longer possible and vice versa. > > 2011-05-22 =A0Thomas Koenig =A0 > > =A0 =A0 =A0 =A0PR fortran/48955 > =A0 =A0 =A0 =A0* gfortran.dg/dependency_40.f90: =A0New test. > > --=20 The knack of flying is learning how to throw yourself at the ground and mis= s. =A0 =A0 =A0=A0 --Hitchhikers Guide to the Galaxy