From patchwork Sat Aug 10 05:26:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1145096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-506625-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=gdcproject.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="OrgcT0BO"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4659Zj4mwPz9sDQ for ; Sat, 10 Aug 2019 15:26:34 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=KSAqmZFU8U0JQA84Z44RP7Fzt9trDKxLteOcSTf0aIjgQh Vcmi49WCDOsqBL67zQkLh+RbH1oAAXYeeQtdSGxC1ZSwFTXVROv0/JINdF5kgqdt fqF6MLfrJEfuvtmNDBLXVsPEcgFG5JlnCjGHi0j5FKzlDZR1Gj2yeB+S07Jjc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=kJQuITE5A9rXXv2NVhCA190XyxI=; b=OrgcT0BO8Uqz7LeYImv8 1Wd3OHiOZjEwFdTQoYVoBI3vZCcacw8M+A2Ri769hrXN+tZvVyWy2dK6Dr03FtRY /uAm+mD+FgDoa7flU31w9mPQ58MHpx/DxeuYcH0uiPYsrHFIeIkPL5MJhmY4Q5ip ve21lXis6AusdXwy7M5RNdI= Received: (qmail 89780 invoked by alias); 10 Aug 2019 05:26:26 -0000 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 Received: (qmail 89771 invoked by uid 89); 10 Aug 2019 05:26:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1798, H*r:209.85.160 X-HELO: mail-qt1-f169.google.com Received: from mail-qt1-f169.google.com (HELO mail-qt1-f169.google.com) (209.85.160.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 10 Aug 2019 05:26:25 +0000 Received: by mail-qt1-f169.google.com with SMTP id k13so665892qtm.12 for ; Fri, 09 Aug 2019 22:26:25 -0700 (PDT) MIME-Version: 1.0 From: Iain Buclaw Date: Sat, 10 Aug 2019 07:26:12 +0200 Message-ID: Subject: [PATCH, PR d/90893] Committed fix for ODR violation in d/runtime.cc To: gcc-patches X-IsSubscribed: yes Hi, This patch renames libcall_type to d_libcall_type, fixing PR d/90893. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to trunk as r274249. diff --git a/gcc/d/runtime.cc b/gcc/d/runtime.cc index c2a5c55a1ab..72659aea0e3 100644 --- a/gcc/d/runtime.cc +++ b/gcc/d/runtime.cc @@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see We represent them in the frontend here, however there's no guarantee that the compiler implementation actually matches the actual implementation. */ -enum libcall_type +enum d_libcall_type { LCT_VOID, /* void */ LCT_BYTE, /* byte */ @@ -81,7 +81,7 @@ static tree libcall_decls[LIBCALL_LAST]; arrayOf() will return cached types if they have been requested before. */ static Type * -get_libcall_type (libcall_type type) +get_libcall_type (d_libcall_type type) { if (libcall_types[type]) return libcall_types[type]; @@ -212,7 +212,7 @@ get_libcall_type (libcall_type type) the number of arguments, the types of which are provided in `...'. */ static tree -build_libcall_decl (const char *name, libcall_type return_type, +build_libcall_decl (const char *name, d_libcall_type return_type, int flags, int nparams, ...) { tree *args = XALLOCAVEC (tree, nparams); @@ -226,7 +226,7 @@ build_libcall_decl (const char *name, libcall_type return_type, for (int i = 0; i < nparams; i++) { - libcall_type ptype = (libcall_type) va_arg (ap, int); + d_libcall_type ptype = (d_libcall_type) va_arg (ap, int); Type *type = get_libcall_type (ptype); if (type == Type::tvoid)