]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: sem_ch13.adb: accept VADS inline asm in Relaxed RM Semantics mode
authorGhjuvan Lacambre <lacambre@adacore.com>
Mon, 17 Nov 2025 15:23:50 +0000 (16:23 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 27 Nov 2025 12:57:44 +0000 (13:57 +0100)
commit52d71516634642bf99108fe7cfbfcbc46639518e
treeac0774e6e353fd0b54f73cc3c07f8e649cc53060
parent82193bed681a32919e833e931346ea5eed27e511
ada: sem_ch13.adb: accept VADS inline asm in Relaxed RM Semantics mode

VADS inline assembly works by using a qualified expression for one of
the types defined in the Machine_Code package, e.g.

   procedure P is
   begin
      code_2'(INSTR, OPERAND1, OPERAND2);
   end y;

This is different from GNAT's own inline assembly machinery, which
instead expects a call to Machine_Code.ASM with a set of
differently-typed arguments.

This incompatibility is preventing GNATSAS' GNAT-Warnings engine from
analyzing VADS code, hence we adapt sem_ch13.adb to not fail on such
constructs when GNAT is running under both Check_Semantics_Only_Mode and
Relaxed_RM_Semantics mode.

gcc/ada/ChangeLog:

* sem_ch13.adb (Analyze_Code_Statement): Do not emit error
message when only checking relaxed semantics.
gcc/ada/sem_ch13.adb