From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29049 invoked by alias); 25 Apr 2009 00:36:30 -0000 Received: (qmail 29038 invoked by uid 22791); 25 Apr 2009 00:36:29 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Apr 2009 00:36:25 +0000 Received: by wf-out-1314.google.com with SMTP id 25so1074354wfc.14 for ; Fri, 24 Apr 2009 17:36:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.45.14 with SMTP id x14mr854906wfj.329.1240619782804; Fri, 24 Apr 2009 17:36:22 -0700 (PDT) In-Reply-To: <49EF7C78.1080701@redhat.com> References: <49EF7C78.1080701@redhat.com> Date: Sat, 25 Apr 2009 00:53:00 -0000 Message-ID: <6dc9ffc80904241736u1cc6ece8ide5df98386bc9056@mail.gmail.com> Subject: Re: Patch fixing a typo. From: "H.J. Lu" To: Vladimir Makarov Cc: gcc-patches , Ian Lance Taylor Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2009-04/txt/msg01964.txt.bz2 On Wed, Apr 22, 2009 at 1:22 PM, Vladimir Makarov wro= te: > I've made a mistake when prepared a big patch in Dec (this patch without > #ifdef was successfully tested on m32c. =A0#ifdef and #endif were added a= bit > lately and the final patch was bootstrapped and tested on x86/x86_64). = =A0Ian > recently found this typo > > http://gcc.gnu.org/ml/gcc/2009-04/msg00544.html > > The typo was not a serious one. =A0It could have resulted in worse code f= or > most targets when -fira-algorithm=3Dpriority is used (it is not a default= for > all architectures except for m32c). =A0Although it might have created pro= blems > for m32c (a weird architecture which uses priority coloring by default). > > Here is the fix > > 2009-04-22 =A0Vladimir Makarov =A0 > > =A0 * genpreds.c (write_enum_constraint_num): Output definition of > =A0 CONSTRAINT_NUM_DEFINED_P macro. > =A0 * ira.c (setup_cover_and_important_classes): Use > =A0 CONSTRAINT_NUM_DEFINED_P instead of CONSTRAINT__LIMIT in #ifdef. > > The patch was successfully bootstrapped on x86_64. =A0I hope it will also= fix > a m32c failure reported by DJ recently. > > Is it ok to commit? > > > Index: genpreds.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- genpreds.c =A0(revision 146528) > +++ genpreds.c =A0(working copy) > @@ -954,6 +954,7 @@ write_enum_constraint_num (void) > =A0{ > =A0 struct constraint_data *c; > > + =A0fputs ("#define CONSTRAINT_NUM_DEFINED_P 1\n", stdout); > =A0 fputs ("enum constraint_num\n" > =A0 =A0 =A0 =A0 "{\n" > =A0 =A0 =A0 =A0 " =A0CONSTRAINT__UNKNOWN =3D 0", stdout); > Index: ira.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- ira.c =A0 =A0 =A0 (revision 146528) > +++ ira.c =A0 =A0 =A0 (working copy) > @@ -754,9 +754,9 @@ setup_cover_and_important_classes (void) > =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0if (i =3D=3D NO_REGS) > =A0 =A0 =A0 =A0 =A0 =A0continue; > -#ifdef CONSTRAINT__LIMIT > +#ifdef CONSTRAINT_NUM_DEFINED_P > =A0 =A0 =A0 =A0 =A0for (j =3D 0; j < CONSTRAINT__LIMIT; j++) > - =A0 =A0 =A0 =A0 =A0 if ((int) regclass_for_constraint (j) =3D=3D i) > + =A0 =A0 =A0 =A0 =A0 if ((int) regclass_for_constraint ((enum constraint= _num) j) =3D=3D > i) > =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0if (j < CONSTRAINT__LIMIT) > =A0 =A0 =A0 =A0 =A0 =A0{ > It breaks gcc: cc1: warnings being treated as errors ../../src-trunk/gcc/ira.c: In function 'setup_cover_and_important_classes': ../../src-trunk/gcc/ira.c:763: error: enum conversion in assignment is invalid in C++ make[6]: *** [ira.o] Error 1 --=20 H.J.