From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x432.google.com with SMTP id k9so10118101wri.0 for ; Mon, 05 Sep 2022 00:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date; bh=QjR/tkI4yPPaFphQwyzuDG91l7rtji2p3C+T5w52vN4=; b=HYPdOKNnC6n+zU04YLNVqJ3OdGvFE1e/6/sxWPloK/57FTphdKg62CU0miaHXnAF+1 fqX3hKrbfqRYtTu/jw4e1oBpuDvYUeZTsPhU7evlJVxPnXeJzS4xdU3o6XgTEcaySYgO 1XLj8DLO5F6jVXXKugwidq7//zCvYXPVizvGUvGzIP9H6Jjg1pnSmhIU6gmvWExfTyvD k2ldIZQ39gETsaDwFd9qZy5hqbiqgWzj5otTgz9Xju328+biw5qowrhSAwKAwKxkFN6m yyqV4e9/YHttXI7V4riT7m/GIV9wscvUbk8YW8MU27rxTyqaT5rE0CK1GXrtRFQsQOYO dw3Q== 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-Google-Smtp-Source: AA6agR4E2OKQajraGJlksQbpqxQVuwa2H9T3FzE0dIGYmcee2NFm3QClOYBeU+5Ob7kbj8JGfw+oWw== 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 From: Marc =?iso-8859-1?Q?Poulhi=E8s?= To: gcc-patches@gcc.gnu.org Cc: Arnaud Charlet Subject: [Ada] Secondary stack and i-c* Message-ID: <20220905072602.GA1174669@poulhies-Precision-5550> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" 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 List-Id: --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --PNTmBPCT7hxwcZjr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" 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 --PNTmBPCT7hxwcZjr--