[Ada] Reject use in SPARK of Asm intrinsics for code insertions

Message ID 20220912081932.GA1512996@poulhies-Precision-5550
State New, archived
Headers
Series [Ada] Reject use in SPARK of Asm intrinsics for code insertions |

Commit Message

Marc Poulhiès Sept. 12, 2022, 8:19 a.m. UTC
  SPARK does not allow code insertions. This applies also to
calls to Asm intrinsics defined in System.Machine_Code.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/s-maccod.ads: Mark package as SPARK_Mode Off.
  

Patch

diff --git a/gcc/ada/libgnat/s-maccod.ads b/gcc/ada/libgnat/s-maccod.ads
--- a/gcc/ada/libgnat/s-maccod.ads
+++ b/gcc/ada/libgnat/s-maccod.ads
@@ -33,7 +33,9 @@ 
 --  operations, and also for machine code statements. See GNAT documentation
 --  for full details.
 
-package System.Machine_Code is
+package System.Machine_Code
+  with SPARK_Mode => Off
+is
    pragma No_Elaboration_Code_All;
    pragma Pure;