[Ada] Avoid touching potentially nonexistent memory

Pierre-Marie de Rodat derodat@adacore.com
Tue Sep 17 08:07:00 GMT 2019


...in cases where the Val_2 might cross a page boundary, and the second
page is now known to exist.

Copy_Bitfield is still disabled in the compiler: no test possible.

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

2019-09-17  Bob Duff  <duff@adacore.com>

gcc/ada/

	* libgnat/s-bituti.adb (Get_Val_2, Set_Val_2): Use new routines
	for getting and setting a Val_2, avoiding touching the second
	half when that half might not exist.
	* exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Correct
	tests for potential volatile or independent components. In
	particular, do not call Prefix unless we know it's a slice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 12483 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190917/233122be/attachment.bin>


More information about the Gcc-patches mailing list