public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Arnaud Charlet <charlet@adacore.com>
Subject: [Ada] Secondary stack and i-c*
Date: Mon, 5 Sep 2022 09:26:02 +0200	[thread overview]
Message-ID: <20220905072602.GA1174669@poulhies-Precision-5550> (raw)

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

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.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1445 bytes --]

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
 



                 reply	other threads:[~2022-09-05  7:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220905072602.GA1174669@poulhies-Precision-5550 \
    --to=poulhies@adacore.com \
    --cc=charlet@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).