diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-10-09 15:06:05 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-10-09 15:06:05 +0000 |
commit | c14bd5028a410a277b2e0ba8ffbfe8ee58e74d00 (patch) | |
tree | 1e75f72192e053bcc5375e42817251c26f25fb59 | |
parent | 184d0451c491493927816b41dc0b9eebd63601eb (diff) | |
download | gcc-c14bd5028a410a277b2e0ba8ffbfe8ee58e74d00.zip gcc-c14bd5028a410a277b2e0ba8ffbfe8ee58e74d00.tar.gz gcc-c14bd5028a410a277b2e0ba8ffbfe8ee58e74d00.tar.bz2 |
[Ada] Unnesting: fix handling of private types that are synchronized
2018-10-09 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_unst.adb (In_Synchronized_Call): Handle properly private
types whose full views are synchronized types, in order to
recognize generated subprograms whose bodies must be considered
reachable even if no direct calls to them are visible in the
source.
From-SVN: r264974
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/exp_unst.adb | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bad8460..04b506e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,13 @@ 2018-10-09 Ed Schonberg <schonberg@adacore.com> + * exp_unst.adb (In_Synchronized_Call): Handle properly private + types whose full views are synchronized types, in order to + recognize generated subprograms whose bodies must be considered + reachable even if no direct calls to them are visible in the + source. + +2018-10-09 Ed Schonberg <schonberg@adacore.com> + * exp_ch4.adb (Expand_Modular_Op): When expanding an operation on nonbinary modular types, convert the opersnds to an integer type that is large enough to hold the modulus of the type, which diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 8176fcc..abcc660 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -227,6 +227,12 @@ package body Exp_Unst is while Present (S) and then S /= Standard_Standard loop if Is_Concurrent_Type (S) then return True; + + elsif Is_Private_Type (S) + and then Present (Full_View (S)) + and then Is_Concurrent_Type (Full_View (S)) + then + return True; end if; S := Scope (S); |