Skip to content
Snippets Groups Projects
user avatar
Bob Duff authored
Do not pass null for the Collection parameter when
Finalize_Storage_Only is in effect. If the collection
is null in that case, we will blow up later when we
deallocate the object.

gcc/ada/

	* exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call):
	Remove Finalize_Storage_Only from the code that checks whether to
	pass null to the Collection parameter. Having done that, we don't
	need to check for Is_Library_Level_Entity, because
	No_Heap_Finalization requires that. And if we ever change
	No_Heap_Finalization to allow nested access types, we will still
	want to pass null. Note that the comment "Such a type lacks a
	collection." is incorrect in the case of Finalize_Storage_Only;
	such types have a collection.
b776b08b
History
Name Last commit Last update