From patchwork Mon Sep 5 07:26:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp58214wrt; Mon, 5 Sep 2022 00:34:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+ZVWeJbzrIDXHV3OVsQL+WVY1ycmVZ+yqiKuBwa6ccSoLkY6Ku504O7QEs2Dsq02tFRmF X-Received: by 2002:a05:6402:1d4e:b0:43d:9822:b4d1 with SMTP id dz14-20020a0564021d4e00b0043d9822b4d1mr42609261edb.212.1662363268581; Mon, 05 Sep 2022 00:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662363268; cv=none; d=google.com; s=arc-20160816; b=BISUwhsQiUMKyWwdWwAz5gxyZFedLmeeX3vcv7hyD3/5DT5dsJqgd0EBzRmNWu4hFs jOlQqr0Yh77uLCqMamZj/9s1WFeC7MLMDNco5jP2yjpYCKoE+QoBi/p4emLD1UHg9dKB 4JGXhu388KQHC8hnIZ1EpJzo4V+zU66+Iy0gY6evDXAyJL6+md4lVIA2tfxil4oChysi Tq0GqCa1/oR3E+8kcKhh2KQIMoPBZTra3LaY2yU0e/hy1d6U+1oMtvnEG3fZpalNhhc7 uxTgT1mm4oOKSxGnD4YYLoYDXvmVvlQJ9iiTSIvCS1XdhjFz6886NDCzZJDytNAYv5h9 4KZA== 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 :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=QjR/tkI4yPPaFphQwyzuDG91l7rtji2p3C+T5w52vN4=; b=oX4UivWz4XFdTvUNZL9P0IwmwxmH96Wknqua18eHOcKi6R0XRhHc0JGXxI8hgKuXAl PGRP5lEMY6MLsNaM9aOg5KpH0qle7V/vTJukDPXG1AwmWbSLFmwUQC2j8iIrL94A2gIe cOlKhG33rEiWVEAQjhkMBlaX1DzFBHCQrtJ/wl8n57a7A8TkhVYfu7JzjfSCv97L7se5 l3TD7mbLelP3G77ZC5nPFogq/8uU6kTgyAIICg5J//TDoQ4iXnAquzpL72TLcMKgEPBY sCJEPFGhtDDhpztpMK4tzgRTWP82WmiQpiz0YRSlq/ywlM/gq1fZDkdoW7xH8zb98I7q g+5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ww8aZmo4; 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ga27-20020a1709070c1b00b00730a3906ecfsi7424163ejc.110.2022.09.05.00.34.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 00:34:28 -0700 (PDT) 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=ww8aZmo4; 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 5581E389EC5D for ; Mon, 5 Sep 2022 07:29:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5581E389EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662362992; bh=QjR/tkI4yPPaFphQwyzuDG91l7rtji2p3C+T5w52vN4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ww8aZmo4SzA3te10HsFp0ZNGQRBxVkKMlyMMbMm6P65x+SuoAoeoNV3P9UVDewZEr Uk9/6fUjCrbOz/H+frJhLSALK+KMIegv9b3oQ9frFlmVRLfe4iMw6awzkD/XLVeIfc xfIzUGe24nOd3H5jPIv98iXjL2ky0xCEWvIhKS/4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 1734E385B837 for ; Mon, 5 Sep 2022 07:26:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1734E385B837 Received: by mail-wr1-x432.google.com with SMTP id k9so10118101wri.0 for ; Mon, 05 Sep 2022 00:26:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=QjR/tkI4yPPaFphQwyzuDG91l7rtji2p3C+T5w52vN4=; b=zOVCJBZQGW+7T4GplpiEg6vRtqaO07DPr4yw8TPE33BuNJYW5Wr/7fUWZRd0niyacg 4V/pAqNA80d8rqdkLr0rbIV1vGOLVon7XSii4cBlAykrokWcVlOLd7HvnUzw0SdQ1/Nz SzoFXP7equ7lVuZrrAUAHAG2KuCar4TD9gKvBipx6ISqkwT5VvuhHIasp35sfsM5ttBo H6WHMKaGViaAYaBaXsTuD5L7zxXPd/pKogeL03+F8RDldCPimdcrn9xZ5J6GVBLyEVNn emRkIxK8K+Z8Asli3wsN6ZkB/TY0oHrAoP3+YSacQqrhwmO90YXnvBK14iIiEsfMtwLC G9wA== X-Gm-Message-State: ACgBeo3+AL6ywIdfidZ07v449NzCakQdayhvr7fqlhZIUBRKArCh8kvz fYhmYNBTWSOr5fWkJI8AeKXLNq1AcF56+A== X-Received: by 2002:a5d:4fcb:0:b0:225:6361:bafe with SMTP id h11-20020a5d4fcb000000b002256361bafemr22438519wrw.585.1662362764030; Mon, 05 Sep 2022 00:26:04 -0700 (PDT) Received: from poulhies-Precision-5550 (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id u18-20020a05600c19d200b003a5a5069107sm16475373wmq.24.2022.09.05.00.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 00:26:03 -0700 (PDT) Date: Mon, 5 Sep 2022 09:26:02 +0200 To: gcc-patches@gcc.gnu.org Subject: [Ada] Secondary stack and i-c* Message-ID: <20220905072602.GA1174669@poulhies-Precision-5550> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.5 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 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: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: Marc =?iso-8859-1?q?Poulhi=E8s?= 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?1743114226629479086?= X-GMAIL-MSGID: =?utf-8?q?1743114226629479086?= Extend the previous changes related to Ada.Tags trigerring a dependency on the secondary stack to various i-c* packages. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ali.adb (Scan_ALI): Special case i-c*.ali when setting Sec_Stack_Used. diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -2079,15 +2079,24 @@ package body ALI is -- Processing for SS elsif C = 'S' then - -- Special case: a-tags.ali by itself should not set + -- Special case: a-tags/i-c* by themselves should not set -- Sec_Stack_Used, only if other code uses the secondary -- stack should we set this flag. This ensures that we do -- not bring the secondary stack unnecessarily when using - -- Ada.Tags and not actually using the secondary stack. + -- one of these packages and not actually using the + -- secondary stack. - if Get_Name_String (F) /= "a-tags.ali" then - Opt.Sec_Stack_Used := True; - end if; + declare + File : constant String := Get_Name_String (F); + begin + if File /= "a-tags.ali" + and then File /= "i-c.ali" + and then File /= "i-cstrin.ali" + and then File /= "i-cpoint.ali" + then + Opt.Sec_Stack_Used := True; + end if; + end; -- Invalid switch starting with S