From: Ed Schonberg Date: Tue, 9 Oct 2018 15:06:05 +0000 (+0000) Subject: [Ada] Unnesting: fix handling of private types that are synchronized X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c14bd5028a410a277b2e0ba8ffbfe8ee58e74d00;p=gcc.git [Ada] Unnesting: fix handling of private types that are synchronized 2018-10-09 Ed Schonberg 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bad84603356..04b506e92a9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2018-10-09 Ed Schonberg + + * 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 * exp_ch4.adb (Expand_Modular_Op): When expanding an operation diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 8176fccfec2..abcc6603c51 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);