aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2019-08-13 08:07:29 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-13 08:07:29 +0000
commitebad47fca4b9e8c33aea489c8fc2a633e4c36dd3 (patch)
tree642cc8ed29788924494a357c07ec9b43b9047c0c /gcc/ada/inline.adb
parent1788bf118c1c97a2e3cb8c0526ffe617859eb7d4 (diff)
downloadgcc-ebad47fca4b9e8c33aea489c8fc2a633e4c36dd3.zip
gcc-ebad47fca4b9e8c33aea489c8fc2a633e4c36dd3.tar.gz
gcc-ebad47fca4b9e8c33aea489c8fc2a633e4c36dd3.tar.bz2
[Ada] Avoid crash in GNATprove_Mode on allocator inside type
In the special mode for GNATprove, subtypes should be declared for allocators when constraints are used. This was done previously but it does not work inside spec expressions, as the declaration is not inserted and analyzed in the AST in that case, leading to a later crash on an incomplete entity. Thus, no declaration should be created in such a case, letting GNATprove later reject such code due to the use of an allocator in an interfering context. 2019-08-13 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_ch4.adb (Analyze_Allocator): Do not insert subtype declaration for allocator inside a spec expression. gcc/testsuite/ * gnat.dg/allocator2.adb, gnat.dg/allocator2.ads: New testcase. From-SVN: r274345
Diffstat (limited to 'gcc/ada/inline.adb')
0 files changed, 0 insertions, 0 deletions