]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove dead code for GNATprove inlining
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 5 Dec 2023 13:13:33 +0000 (14:13 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 9 Jan 2024 13:13:30 +0000 (14:13 +0100)
Removed code was dead because it could only be executed when
Back_End_Inlining is True and that flag is always false in
GNATprove_Mode.

gcc/ada/

* inline.adb (Cannot_Inline): Cleanup use of 'Length; remove
dead code.

gcc/ada/inline.adb

index cc2bc3ac18a0c0efcad8e24590c9020c3d038a53..f6bed4d26e384a2e5606c98b1284d0ebccb9c627 100644 (file)
@@ -1983,9 +1983,9 @@ package body Inline is
       then
          declare
             Len1 : constant Positive :=
-              String (String'("cannot inline"))'Length;
+              String'("cannot inline")'Length;
             Len2 : constant Positive :=
-              String (String'("info: no contextual analysis of"))'Length;
+              String'("info: no contextual analysis of")'Length;
 
             New_Msg : String (1 .. Msg'Length + Len2 - Len1);
 
@@ -2044,17 +2044,6 @@ package body Inline is
 
          Error_Msg_NE (Msg (Msg'First .. Msg'Last - 1), N, Subp);
 
-      --  In GNATprove mode, issue an info message when -gnatd_f is set and
-      --  Suppress_Info is False, and indicate that the subprogram is not
-      --  always inlined by setting flag Is_Inlined_Always to False.
-
-      elsif GNATprove_Mode then
-         Set_Is_Inlined_Always (Subp, False);
-
-         if Debug_Flag_Underscore_F and not Suppress_Info then
-            Error_Msg_NE (Msg, N, Subp);
-         end if;
-
       else
 
          --  Do not emit warning if this is a predefined unit which is not