From patchwork Sat Feb 2 21:27:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Gretton-Dann X-Patchwork-Id: 14433 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 279BF23E92 for ; Sat, 2 Feb 2013 21:27:14 +0000 (UTC) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by fiordland.canonical.com (Postfix) with ESMTP id D11E0A1948A for ; Sat, 2 Feb 2013 21:27:13 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id n10so3138798vcn.14 for ; Sat, 02 Feb 2013 13:27:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:mime-version:x-received:date:message-id:subject:from :to:cc:content-type:x-gm-message-state; bh=2z+IRUlT9+Y0E1Lg7gLPhre9QGQrv3j2fUD1Ar2jUxM=; b=AKk3p+1y/h1GRMGY56JNHIIBGO5tEEWnUHvV2B2E0BxY5SF3M4Vizp7uT2bgCMjwpS oem0mqQnEHuakLFbeLYmeX3uG+xx+zhB4Ycr960fy/bcwWe5B3qhHOnrubfFNk3zgu5a EFSBM0j9Yl4RQ9aqvDP8fjqZ4FCyCxAxB5PC4x5Tkr6uRQG39rmYSuokBW+evaOIlqNS 7P/kRN54VlCR25LhTtP8lDbdXAEC8GnrY/k1DbUPznRIl+zyFz69JOR9QuD04Eg9YTsL ce3+epH1g3Y650l7K113ImyZNvBMMBjyeSXTouytjjuaDrFBwSDGp1h4a/WOxnWoJk3j 2UCw== X-Received: by 10.58.231.196 with SMTP id ti4mr11744331vec.25.1359840433328; Sat, 02 Feb 2013 13:27:13 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp23126vec; Sat, 2 Feb 2013 13:27:12 -0800 (PST) X-Received: by 10.14.201.69 with SMTP id a45mr53714182eeo.43.1359840432092; Sat, 02 Feb 2013 13:27:12 -0800 (PST) Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id r2si20032629eeo.30.2013.02.02.13.27.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Feb 2013 13:27:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of matthew.gretton-dann@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of matthew.gretton-dann@linaro.org) smtp.mail=matthew.gretton-dann@linaro.org Received: by mail-ea0-f178.google.com with SMTP id a14so2271615eaa.37 for ; Sat, 02 Feb 2013 13:27:11 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.14.173.69 with SMTP id u45mr54234444eel.21.1359840431430; Sat, 02 Feb 2013 13:27:11 -0800 (PST) Received: by 10.14.126.196 with HTTP; Sat, 2 Feb 2013 13:27:11 -0800 (PST) Date: Sat, 2 Feb 2013 21:27:11 +0000 Message-ID: Subject: [RFA] Fix DEBUG_RELOAD support From: Matthew Gretton-Dann To: "gcc-patches@gcc.gnu.org" Cc: Patch Tracking , uweigand@de.ibm.com, bernds@codesourcery.com, dnovillo@google.com X-Gm-Message-State: ALoCoQlJU3DDZ18DUAopEseVXcp5+QUnimudK5Tr0WuKEGqbumsQ8KgUXZYf3ZzUrhU1BA8e/Lgf Hi, Whilst debugging a reload issue I tried enabling DEBUG_RELOAD, only to find that this caused GCC to fail to build. I think this failure was introduced during the change to vec being a C++ type, as DEBUG_RELOAD is normally forced off. The attached patch fixes the build issue. Tested by building a cross arm-none-linux-gnueabi compiler with DEBUG_RELOAD forced on. OK for trunk? gcc/ChangeLog: 2013-02-02 Matthew Gretton-Dann * gcc/reload.c (subst_reloads): Fix DEBUG_RELOAD build issue. --- Matthew Gretton-Dann Linaro Toolchain Working Group matthew.gretton-dann@linaro.org diff --git a/gcc/reload.c b/gcc/reload.c index 889a6cc..2546c1b 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6313,14 +6313,14 @@ subst_reloads (rtx insn) for (check_regno = 0; check_regno < max_regno; check_regno++) { #define CHECK_MODF(ARRAY) \ - gcc_assert (!reg_equivs[check_regno].ARRAY \ + gcc_assert (!(*reg_equivs)[check_regno].ARRAY \ || !loc_mentioned_in_p (r->where, \ - reg_equivs[check_regno).ARRAY)] + (*reg_equivs)[check_regno].ARRAY)) - CHECK_MODF (equiv_constant); - CHECK_MODF (equiv_memory_loc); - CHECK_MODF (equiv_address); - CHECK_MODF (equiv_mem); + CHECK_MODF (constant); + CHECK_MODF (memory_loc); + CHECK_MODF (address); + CHECK_MODF (mem); #undef CHECK_MODF } #endif /* DEBUG_RELOAD */