From patchwork Tue Feb 14 10:42:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Yong <10walls@gmail.com> X-Patchwork-Id: 56837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2892496wrn; Tue, 14 Feb 2023 02:43:13 -0800 (PST) X-Google-Smtp-Source: AK7set+wT2nkt8OT8IaIuEocjwRLd6nQfIMy8moK8na6pluTr/3WrT0IHTm3bQVlVyn5RxqAGuIl X-Received: by 2002:a17:907:984a:b0:88d:d700:fe15 with SMTP id jj10-20020a170907984a00b0088dd700fe15mr2591996ejc.0.1676371393275; Tue, 14 Feb 2023 02:43:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676371393; cv=none; d=google.com; s=arc-20160816; b=ZeeKjJI3tXHwmQ/7Lxwb8SYH7WkzI/k28j4hSprjTAq9dtL+LrVQGc10A/hB4MVbZ0 edzsdzjLW1C33fSbAyzD0O80jeMEStePkwODx0fsL2JFZummRbT0aJbIfH9auqagKxYX l2DLgmQoSSDUT6/nKySGlxrQbt7KFqSbvVXW8Go6J0dBAhBPRJK4wtCn5L26eImtKORn Nt8kOY4WilQfvbyhy0wrTu57r0LSsMk9ov1xS1+m+YzRM2FS5PH0oJSxMpCjgm5vskyu +8wXQo/L1+/YtboyVnpNjyp4PdcWHDuenamrYR9bXi2oyZ+IuVS2JnwE3fZAG/xC2fnY lehA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :content-language:user-agent:mime-version:date:message-id :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=uspvKDOwMy6yGyz9e+4rv50VP3h6pcFXbKVf1JrXN1o=; b=ATVyrVAyQj+S/slGQZudvOW6S86FHfm0bbJ+bhWTn5LXuQR4ZBol404XR+TYqy8Koc 3M578y6aFIKR2Pz3V0OyTmXjHdmOgtOAhXufyLzIGeuPRN93AG/XUQZbwVIxzRBOMjr5 e/CfZAL9M1x3t5Dlieh8DIx36JMZzHqI7RKn6Ko0qG6NblDJi4rlYtX13naFFOsS06bY hJPVCoRJCCBW89sVzkLq2B+uLTqSBJ6mcCg0Br5OHFo2FqmjioIBjz67o/nkWaOKh+zd p96ecWseeMlxUJLTirh4in1jIpEFVuPAOiwfX3gO1dTGjuYQ/YyqDTCby04tpmInCgTq c6cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IEXa7yst; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u26-20020a170906109a00b008aab5c0b1bcsi19618672eju.550.2023.02.14.02.43.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 02:43:13 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IEXa7yst; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56B683858C53 for ; Tue, 14 Feb 2023 10:43:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56B683858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676371392; bh=uspvKDOwMy6yGyz9e+4rv50VP3h6pcFXbKVf1JrXN1o=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=IEXa7ystrMXlBf/ldEPmEZ+a8qnaRWFwRKzy32WcY4FjWKgdoZx3iWUXwjbHuq27g 3umR6C+bp1xlMyGtCyjagh4e334jX66gMblVuYMbqnaKTn4hwB7qZjhoAs7hYDIPfK jlrisis9XOcUTF8p+XjuJdHFV650+Z49NmdtpW/E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 1BCBB3858D1E for ; Tue, 14 Feb 2023 10:42:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BCBB3858D1E Received: by mail-pj1-x102f.google.com with SMTP id o13so14710138pjg.2 for ; Tue, 14 Feb 2023 02:42:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uspvKDOwMy6yGyz9e+4rv50VP3h6pcFXbKVf1JrXN1o=; b=TVZgRFXWsRZ3N7RPLGA/kdAAnJNU0Ea1ZO15KLbDJ66BfWcKfAK2X9mWBeZK5skxtI 7F9FV4BSbdwVKO3ayNTeRWXd7wK5Q2c0sri8bTMqQLjLEYIMu17DW3PA3FkO9HeXRo8T 2ZTnykpSEbIg3AiTXT726xwrJ18jO840sn0VNCtpYjWT7QMO8s4XatB7dZvUA/XWlI/v 1Tn0p91WHW12M3sZfYKAabi310kYYne3XNVDrAQmBxlk+71vyf99ESGIrkN86J0nSd9P 1co7JdeoIPKhsm2DGXrJPltaiGF78AkN/IyJ4z0Td+5PhqAF0iswP4DYbOiCo8K5Yjl1 2U+A== X-Gm-Message-State: AO0yUKXW/xxpQAxSRHR8VjsePzPdQrNJq0wssMYL8tWJ+Rfiz9M4m0fz 3AcOR9gndRuICLaQevDrMAGm4DSjA1U= X-Received: by 2002:a17:90b:38e:b0:233:c3e3:182f with SMTP id ga14-20020a17090b038e00b00233c3e3182fmr1957939pjb.8.1676371344982; Tue, 14 Feb 2023 02:42:24 -0800 (PST) Received: from ?IPV6:2001:f40:91b::31ee? ([2001:f40:91b::31ee]) by smtp.gmail.com with ESMTPSA id t14-20020a17090b018e00b0022bb3ee9b68sm4477611pjs.13.2023.02.14.02.42.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Feb 2023 02:42:24 -0800 (PST) Message-ID: Date: Tue, 14 Feb 2023 10:42:21 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: Gcc Patch List Subject: [Patch] More LLP64 fixes and __PIC__ values fixes for PE targets X-Spam-Status: No, score=-3038.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Yong via Gcc-patches From: Jonathan Yong <10walls@gmail.com> Reply-To: Jonathan Yong <10walls@gmail.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757802810020245069?= X-GMAIL-MSGID: =?utf-8?q?1757802810020245069?= Attached patches OK? From a1fafc5a3c70684e843f5f0b6cf392ce349cb6b0 Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10walls@gmail.com> Date: Tue, 14 Feb 2023 10:29:05 +0000 Subject: [PATCH 1/2] gcc/testsuite/gcc.dg: fix LLP64 targets gcc/testsuite/ChangeLog: * gcc.dg/builtins-69.c: Use (long )*regex pattern to allow long long instead of just long. * gcc.dg/pr80163.c: use __INTPTR_TYPE__ for LLP64 tagets. Signed-off-by: Jonathan Yong <10walls@gmail.com> --- gcc/testsuite/gcc.dg/builtins-69.c | 2 +- gcc/testsuite/gcc.dg/pr80163.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/builtins-69.c b/gcc/testsuite/gcc.dg/builtins-69.c index 26dfb3bfc1b..b754b5d26ee 100644 --- a/gcc/testsuite/gcc.dg/builtins-69.c +++ b/gcc/testsuite/gcc.dg/builtins-69.c @@ -14,7 +14,7 @@ int test_index (void) /* PR middle-end/86202 - ICE in get_range_info calling an invalid memcpy() declaration */ -void *memcpy (void *, void *, __SIZE_TYPE__ *); /* { dg-warning "conflicting types for built-in function .memcpy.; expected .void \\\*\\\(void \\\*, const void \\\*, \(long \)?unsigned int\\\)." } */ +void *memcpy (void *, void *, __SIZE_TYPE__ *); /* { dg-warning "conflicting types for built-in function .memcpy.; expected .void \\\*\\\(void \\\*, const void \\\*, \(long \)*unsigned int\\\)." } */ void test_memcpy (void *p, void *q, __SIZE_TYPE__ *r) { diff --git a/gcc/testsuite/gcc.dg/pr80163.c b/gcc/testsuite/gcc.dg/pr80163.c index 37a7abd1181..f65955c0ec9 100644 --- a/gcc/testsuite/gcc.dg/pr80163.c +++ b/gcc/testsuite/gcc.dg/pr80163.c @@ -2,6 +2,7 @@ /* { dg-do compile { target int128 } } */ /* { dg-options "-O0" } */ +typedef __INTPTR_TYPE__ intptr_t; void bar (void); __int128_t * @@ -10,7 +11,7 @@ foo (void) a: bar (); b:; - static __int128_t d = (long) &&a - (long) &&b; /* { dg-error "initializer element is not computable at load time" } */ + static __int128_t d = (intptr_t) &&a - (intptr_t) &&b; /* { dg-error "initializer element is not computable at load time" } */ return &d; } -- 2.39.1