]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Cleanup a statically true condition in expanded raise statement
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 12 Jan 2021 20:16:28 +0000 (21:16 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 5 May 2021 08:19:04 +0000 (04:19 -0400)
gcc/ada/

* exp_ch4.adb (Apply_Accessibility_Check): Skip a statically
true condition in expanded raise statement.

gcc/ada/exp_ch4.adb

index 0ef744b48f36b80ffaf7eac52e8d94c23b05da87..cfdfefce5f3c06acf239e59ca365d37af650da91 100644 (file)
@@ -737,8 +737,7 @@ package body Exp_Ch4 is
 
             Append_To (Stmts,
               Make_Raise_Program_Error (Loc,
-                Condition => New_Occurrence_Of (Standard_True, Loc),
-                Reason    => PE_Accessibility_Check_Failed));
+                Reason => PE_Accessibility_Check_Failed));
 
             --  Step 2: Create the accessibility comparison