[Ada] Unnesting: do not set size of access subprograms

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* layout.adb: Do not set size of access subprogram if unnesting.

From-SVN: r263721
This commit is contained in:
Ed Schonberg 2018-08-21 14:46:59 +00:00 committed by Pierre-Marie de Rodat
parent c7fafef974
commit 5c0972ba85
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* layout.adb: Do not set size of access subprogram if unnesting.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* freeze.adb: Remove warnings for access to subprograms when

View File

@ -325,6 +325,17 @@ package body Layout is
then
Init_Size (E, 2 * System_Address_Size);
-- If unnesting subprograms, subprogram access types contain the
-- address of both the subprogram and an activation record. But
-- if we set that, we'll get a warning on different unchecked
-- conversion sizes in the RTS. So leave unset ub that case.
elsif Unnest_Subprogram_Mode
and then Is_Access_Subprogram_Type (E)
then
-- Init_Size (E, 2 * System_Address_Size);
null;
-- Normal case of thin pointer
else