]> gcc.gnu.org Git - gcc.git/commit
ada: Do not inline subprogram which could cause SPARK violation
authorYannick Moy <moy@adacore.com>
Tue, 23 Apr 2024 11:16:51 +0000 (13:16 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 13 Jun 2024 13:30:29 +0000 (15:30 +0200)
commitdf9d6153e1981676b08109fbe3371ca6e9d5f755
treea5d32939469266cf1f0cec304aa6b3ea871aba8c
parent2afa7fd8c6d32264d4d3d917318fbac9f7f38508
ada: Do not inline subprogram which could cause SPARK violation

Inlining in GNATprove a subprogram containing a constant declaration with
an address clause/aspect might lead to a spurious error if the address
expression is based on a constant view of a mutable object at call site.
Do not allow such inlining in GNATprove.

gcc/ada/

* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
when constant with address clause is found.
gcc/ada/inline.adb
This page took 0.049473 seconds and 5 git commands to generate.