diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-08-21 14:46:59 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-08-21 14:46:59 +0000 |
commit | 5c0972ba85975672ae89ce70a562133a506689d1 (patch) | |
tree | fdc3e10b01ee760bdd4f23e74f3522df2ffb902e | |
parent | c7fafef9742fac01de19c1422d769eeb9b368109 (diff) | |
download | gcc-5c0972ba85975672ae89ce70a562133a506689d1.zip gcc-5c0972ba85975672ae89ce70a562133a506689d1.tar.gz gcc-5c0972ba85975672ae89ce70a562133a506689d1.tar.bz2 |
[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
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/layout.adb | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9737c07..dee7064 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 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 unnesting is active. diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index 6b77757..23436c8 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -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 |