[Ada] Prevent crash on inspection point for unfrozen entity
commitcd4341ef953bc5697917b3e6e43c59be03da0bee
authorGhjuvan Lacambre <lacambre@adacore.com>
Tue, 25 May 2021 12:12:37 +0000 (25 14:12 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 8 Jul 2021 13:34:18 +0000 (8 13:34 +0000)
tree265e12f8c9985d08f761fbe484821f81c8a69f50
parent242c0f4772c6697ba0b27853f153a13970bbded9
[Ada] Prevent crash on inspection point for unfrozen entity

gcc/ada/

* exp_prag.adb (Expand_Pragma_Inspection_Point): After expansion
of the Inspection_Point pragma, check if referenced entities
that have a freeze node are already frozen. If they aren't, emit
a warning and turn the pragma into a no-op.
gcc/ada/exp_prag.adb