[Ada] Compiler crash on assertion pragma in ghost region

Pierre-Marie de Rodat derodat@adacore.com
Tue Nov 24 10:17:02 GMT 2020

This patch fixes an error in the compiler whereby an assertion pragma
within a ghost context whose expression causes the freezing of a
non-ghost type causes the compiler to crash during compilation when
ghost mode is disabled.

Tested on x86_64-pc-linux-gnu, committed on trunk


	* sem_prag.adb (Analyze_Pragma): Mark relevant pragmas as ghost
	when they are within a ghost region.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 451 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201124/a060c7e5/attachment-0001.bin>

More information about the Gcc-patches mailing list