From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8104 invoked by alias); 27 Jul 2007 11:29:58 -0000 Received: (qmail 8091 invoked by uid 22791); 27 Jul 2007 11:29:57 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.181) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jul 2007 11:29:54 +0000 Received: by py-out-1112.google.com with SMTP id a29so1923289pyi for ; Fri, 27 Jul 2007 04:29:53 -0700 (PDT) Received: by 10.64.184.16 with SMTP id h16mr4783699qbf.1185535792920; Fri, 27 Jul 2007 04:29:52 -0700 (PDT) Received: by 10.65.240.11 with HTTP; Fri, 27 Jul 2007 04:29:52 -0700 (PDT) Message-ID: <84fc9c000707270429p60cb41e2ic4ab1ac722f18a1e@mail.gmail.com> Date: Fri, 27 Jul 2007 13:25:00 -0000 From: "Richard Guenther" To: "Zdenek Dvorak" Subject: Re: [patch] Fix gimple type checking errors on ppc Cc: gcc-patches@gcc.gnu.org In-Reply-To: <20070727103731.GA14249@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070727103731.GA14249@kam.mff.cuni.cz> 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: 2007-07/txt/msg01980.txt.bz2 On 7/27/07, Zdenek Dvorak wrote: > Hello, > > build of gcc on ppc and ppc64 is failing for me with gimple type > checking messages. The problem is in the code generated by > rs6000_gimplify_va_arg, when TREE_TYPE (reg) is not compatible with > sizetype. > > Bootstrapped & regtested on {ppc, ppc64}-linux. Ok, thanks. Richard. > Zdenek > > * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Generate the > operands with compatible type. > > Index: config/rs6000/rs6000.c > =================================================================== > *** config/rs6000/rs6000.c (revision 126959) > --- config/rs6000/rs6000.c (working copy) > *************** rs6000_gimplify_va_arg (tree valist, tre > *** 6465,6471 **** > { > regalign = 1; > u = build2 (BIT_AND_EXPR, TREE_TYPE (reg), reg, > ! size_int (n_reg - 1)); > u = build2 (POSTINCREMENT_EXPR, TREE_TYPE (reg), reg, u); > } > /* _Decimal128 is passed in even/odd fpr pairs; the stored > --- 6465,6471 ---- > { > regalign = 1; > u = build2 (BIT_AND_EXPR, TREE_TYPE (reg), reg, > ! build_int_cst (TREE_TYPE (reg), n_reg - 1)); > u = build2 (POSTINCREMENT_EXPR, TREE_TYPE (reg), reg, u); > } > /* _Decimal128 is passed in even/odd fpr pairs; the stored > *************** rs6000_gimplify_va_arg (tree valist, tre > *** 6487,6493 **** > if (sav_ofs) > t = build2 (POINTER_PLUS_EXPR, ptr_type_node, sav, size_int (sav_ofs)); > > ! u = build2 (POSTINCREMENT_EXPR, TREE_TYPE (reg), reg, size_int (n_reg)); > u = fold_convert (sizetype, u); > u = build2 (MULT_EXPR, sizetype, u, size_int (sav_scale)); > t = build2 (POINTER_PLUS_EXPR, ptr_type_node, t, u); > --- 6487,6494 ---- > if (sav_ofs) > t = build2 (POINTER_PLUS_EXPR, ptr_type_node, sav, size_int (sav_ofs)); > > ! u = build2 (POSTINCREMENT_EXPR, TREE_TYPE (reg), reg, > ! build_int_cst (TREE_TYPE (reg), n_reg)); > u = fold_convert (sizetype, u); > u = build2 (MULT_EXPR, sizetype, u, size_int (sav_scale)); > t = build2 (POINTER_PLUS_EXPR, ptr_type_node, t, u); >