public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Secondary stack and i-c*
@ 2022-09-05  7:26 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2022-09-05  7:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: Arnaud Charlet

[-- 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
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-05  7:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05  7:26 [Ada] Secondary stack and i-c* Marc Poulhiès

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).