public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Reject use in SPARK of Asm intrinsics for code insertions
@ 2022-09-12  8:19 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2022-09-12  8:19 UTC (permalink / raw)
  To: gcc-patches; +Cc: Yannick Moy

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

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.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 412 bytes --]

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;
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-12  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12  8:19 [Ada] Reject use in SPARK of Asm intrinsics for code insertions Marc Poulhiès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).