From patchwork Wed Nov 8 15:57:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 163097 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp1006235vqo; Wed, 8 Nov 2023 07:58:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvqaFGylcGyWeqSYUq30UqwY2tdg+xGhKhnQacV49pK9OHd4muZD4X9M5rASHVVRag826B X-Received: by 2002:a05:6808:6508:b0:3b5:6a28:fcdd with SMTP id fm8-20020a056808650800b003b56a28fcddmr2603293oib.18.1699459080997; Wed, 08 Nov 2023 07:58:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699459080; cv=pass; d=google.com; s=arc-20160816; b=GaZsAZ3TY2BiRqFnUxnjnIexjZSanv92sQ6wjaDX3Itw4CakiM990tBgefXISj0Dk5 kguqkegxcbL/W4ZDpobiVynETFOCIdFIzhy8vcKX4Ix6WHPPfN7DFtsDx6Ch5B3Md35H JWfIQvl+JsJKeOTOPIfQPEnNCAtqCZ0MgYtwWFVA/Hw0CmF4jMtYZMlRU/0lMq/BBqCA 7L18A+Ay47bt0c2w/DJPaHjESUoiwHQ7He2a5NQCsiJUySyDr7Qld3/+veRQsbPxzFhy HA+nuaeLdLURORg91IcAN/S1WfsAGgF2406CXJr8nhdeR+brjmv5UPeypn8G75ZFi6Au h99A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:organization:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=JMe/ONhNhBA6NX+MNEYAGgX8hHqNoD+aPEjucZShxwM=; fh=oexAcL1GQ/7KI5o7JIA5z5L7G+umyjSpuUDYjScX5yc=; b=ds964Tsmyz3bIdX2oO1JDC0OiB5m4RHIJhtMLZ3PAhJ8IsBi0jv0fVYDsEIiixM3ds CLya37uIJhm9HWJG/9XsRjZJe1tk3bqdypaf1OzyOPb6qiV9UYGmyP9tsd3+vs3OXrY/ C1qkj+6JXCLD9fgnhxzDNYbOs22mXbcmxe1pslEIwUZHljAO91RbNxDIrvbuXawU7ZBQ 29mn5VzafCeMn/Cc9frAgHy3RF7LznrGy/SsfkcjiPvVcMREKJjVPotCPmiFFqBuPo3h ymjpIk30r4h7vx3Sd5iXrKA9+pIH5JBfRGaVWrKoqc6W/GwKcRmVixWw5AI9MTJZbViA Pfgg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=DGFsjUDz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g7-20020ad45147000000b00671b0299051si1441012qvq.317.2023.11.08.07.58.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 07:58:00 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=DGFsjUDz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF92E3858291 for ; Wed, 8 Nov 2023 15:58:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by sourceware.org (Postfix) with ESMTPS id C0E103858D37 for ; Wed, 8 Nov 2023 15:57:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C0E103858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C0E103858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::f35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699459057; cv=none; b=oS0A0KZ6zGNZDS8Ts5tB+SmPN3xYWar9qApMG/amphNGcPxrK0F0BHq2uMILTzY7XfUOpEgnDYEC3CVN8+UoSqc0Q7fUcfLnKenMdfbN6Uy0dKVPxpqoRgvSwN3cRa3s3VFdpas1Fr0TGIbD1+zTPrP1goVv+WV1RFWPYF4WGyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699459057; c=relaxed/simple; bh=uTSollGbFMttvnkExZAorOiwL/DYJTkvOXT0qUwWfK4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=I/3uonLF/WSa7l6sd4yeF78RKT50+02DiFKviHHgn+fOrmWrBrWf0d3fTLaIfe+ooxmqmKRl+1OK4uPfaP4g6C4xJqKN48PBWFDBweg25b7Bd2SkK6v8eTH0sSNVGsfOBNSRAEGUc/yoSsQkKTAvR1tgfPVNum+BkV1U+aZeZXU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-66d09b6d007so48110976d6.1 for ; Wed, 08 Nov 2023 07:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1699459056; x=1700063856; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=JMe/ONhNhBA6NX+MNEYAGgX8hHqNoD+aPEjucZShxwM=; b=DGFsjUDzywzB3t32V9pFQknrzqH28xgatN0CQuOO/QddbnTzB2RW+2JZW6rNN0aceM vuvn6EBYH5qLNTXUmJr0Dl5VEhVSfxuovT6wMZv5TH9++SO5rF3CBjogbW/QxAhRxAEC ZDQxrDMsv0ZDsEKgpzRBMCTPl1DdEd3a9wlMpqLwLQApuGRtzE4fq8CGB11E0QhkUveZ bZrefVJDH/aLrsz2EYgiNnkW/PNlTljtzDSRk/1eot4BfZ+05NWWZ18y15jhUdjDVZTd bjjZhXfqqz4ts/ecWBTz1wgRbYnBVK1Q2Cjm9mCnBpToH4DXguPRbMFa2ZDlGOvBcqo1 6U1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699459056; x=1700063856; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JMe/ONhNhBA6NX+MNEYAGgX8hHqNoD+aPEjucZShxwM=; b=txtFm+CfQ9tUXqkd8aWwoIe1OnD/GFooARSv2Cgzzj3/1+7yNZmh0e1BSs5DZUzMk+ 8LYPxQV23LuuvP26GEVNOZFB+Qc0DwY2Q485dPvDS9IRJIRR0C5QKXi5LfRsomTV3IaT svlwheH6sHjcyFhIG9lfNlw1OL3UMc4fq1Z/zUEXL6d7ZHRm9vE8Hema/PfLzZWyHyoD +txfbPLPy//HOV1LyXXu72Vhea+QX2HRRA5eCmosxERUylnsSd2DRrbh/wYkC6QJpbkL E2pChNqv3HqL/OzKj47Aku4gW7rzwVq2rHwgmo0BisKPELNFgU5R48PW36imkSVggQKj 8ZPQ== X-Gm-Message-State: AOJu0YzFeFrpEwRHTDkXFUn7pFWduaa3UiYkqd4eEKRP5J5vyfdPo1jS 75PNg/xWTfcsY9S3yihTmBKpvjgKRwzWThsEu8vwgQ== X-Received: by 2002:a05:6214:1d23:b0:656:3407:f45a with SMTP id f3-20020a0562141d2300b006563407f45amr2882791qvd.43.1699459056259; Wed, 08 Nov 2023 07:57:36 -0800 (PST) Received: from free.home ([2804:7f1:2080:e9c8:ff5e:88e8:a900:d7b4]) by smtp.gmail.com with ESMTPSA id x4-20020a0cfe04000000b0065b0554ae78sm1178718qvr.100.2023.11.08.07.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 07:57:36 -0800 (PST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 3A8FvSUv2214911 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 8 Nov 2023 12:57:28 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump Subject: [PATCH] testsuite: force PIC/PIE off for pr58245-1.C Organization: Free thinker, does not speak for AdaCore Date: Wed, 08 Nov 2023 12:57:28 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_QUOTING 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782012005383026805 X-GMAIL-MSGID: 1782012005383026805 This test expects a single mention of stack_chk_fail, as part of a call sequence, but when e.g. PIE is enabled by default, we output .hidden stack_chk_fail_local, which makes for a count mismatch. Disable PIC/PIE so as to not depend on the configurable default. Regstrapped on x86_64-linux-gnu, also tested with gcc-13 on i686- and x86_64-. Ok to install? for gcc/testsuite/ChangeLog * g++.dg/pr58245-1.C: Disable PIC/PIE. --- gcc/testsuite/g++.dg/pr58245-1.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/testsuite/g++.dg/pr58245-1.C b/gcc/testsuite/g++.dg/pr58245-1.C index 1439bc62e710e..71d4736ddf610 100644 --- a/gcc/testsuite/g++.dg/pr58245-1.C +++ b/gcc/testsuite/g++.dg/pr58245-1.C @@ -8,3 +8,7 @@ bar (void) } /* { dg-final { scan-assembler-times "stack_chk_fail" 1 } } */ + +/* When compiling for PI[EC], we issue a .hidden stack_chk_fail_local, + that causes the above to fail the expected match count. */ +/* { dg-additional-options "-fno-PIC" } */