From patchwork Tue Aug 16 14:14:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 110186 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 45D46B6F76 for ; Wed, 17 Aug 2011 00:15:13 +1000 (EST) Received: (qmail 17498 invoked by alias); 16 Aug 2011 14:15:08 -0000 Received: (qmail 17241 invoked by uid 22791); 16 Aug 2011 14:15:04 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Aug 2011 14:14:50 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7GEEo6P013203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Aug 2011 10:14:50 -0400 Received: from hase.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7GEElNV016436; Tue, 16 Aug 2011 10:14:48 -0400 From: Andreas Schwab To: Laurynas Biveinis Cc: Richard Guenther , Liang Wang , gcc-patches@gcc.gnu.org Subject: Re: [PATCH ggc] fix ggc_alloc_rtvec_resized References: X-Yow: I'm shaving!! I'M SHAVING!! Date: Tue, 16 Aug 2011 16:14:48 +0200 In-Reply-To: (Laurynas Biveinis's message of "Tue, 16 Aug 2011 16:52:19 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Laurynas Biveinis writes: > The patch to adjust the definition is obvious/pre-approved if anyone's > inclined, or I'll just note in my TODO to fix this the next time I > commit something. Since I had it already readily tested on x86_64-linux, I've checked this in. Andreas. 2011-08-16 Andreas Schwab * ggc.h (ggc_alloc_rtvec_sized): Use ggc_alloc_zone_rtvec_def instead of ggc_alloc_zone_vec_rtvec_def. diff --git a/gcc/ggc.h b/gcc/ggc.h index 07f0dda..30eca66 100644 --- a/gcc/ggc.h +++ b/gcc/ggc.h @@ -1,7 +1,7 @@ /* Garbage collection for the GNU compiler. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, - 2008, 2009, 2010 Free Software Foundation, Inc. + 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -266,10 +266,9 @@ extern struct alloc_zone tree_zone; extern struct alloc_zone tree_id_zone; #define ggc_alloc_rtvec_sized(NELT) \ - (ggc_alloc_zone_vec_rtvec_def (1, \ - sizeof (struct rtvec_def) \ - + ((NELT) - 1) * sizeof (rtx), \ - &rtl_zone)) + ggc_alloc_zone_rtvec_def (sizeof (struct rtvec_def) \ + + ((NELT) - 1) * sizeof (rtx), \ + &rtl_zone) #if defined (GGC_ZONE) && !defined (GENERATOR_FILE)