]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Secondary stack and i-c*
authorArnaud Charlet <charlet@adacore.com>
Tue, 19 Jul 2022 14:58:44 +0000 (14:58 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 5 Sep 2022 07:21:03 +0000 (09:21 +0200)
Extend the previous changes related to Ada.Tags trigerring a
dependency on the secondary stack to various i-c* packages.

gcc/ada/

* ali.adb (Scan_ALI): Special case i-c*.ali when setting
Sec_Stack_Used.

gcc/ada/ali.adb

index bcc8822940ebe3aa936730f090e3d3d978e113bd..3febd48104895875804217a420e73ac3e07b7ae1 100644 (file)
@@ -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