Commit 5c0972ba by Ed Schonberg Committed by Pierre-Marie de Rodat

[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
parent c7fafef9
2018-08-21 Ed Schonberg <schonberg@adacore.com> 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 * freeze.adb: Remove warnings for access to subprograms when
unnesting is active. unnesting is active.
......
...@@ -325,6 +325,17 @@ package body Layout is ...@@ -325,6 +325,17 @@ package body Layout is
then then
Init_Size (E, 2 * System_Address_Size); 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 -- Normal case of thin pointer
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment