From 31f905391fb09c0de99da3d500623bdbd9aa0cc2 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 5 Dec 2023 14:13:33 +0100 Subject: [PATCH] ada: Remove dead code for GNATprove inlining 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 | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index cc2bc3ac18a..f6bed4d26e3 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -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 -- 2.11.4.GIT