public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4297] [Ada] Simplify initialization of concurrent components
@ 2021-10-11 13:39 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-11 13:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1bafcab05cbff1cc98e3ca867b4474401eec729b
commit r12-4297-g1bafcab05cbff1cc98e3ca867b4474401eec729b
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Wed Sep 29 16:10:23 2021 +0200
[Ada] Simplify initialization of concurrent components
gcc/ada/
* exp_ch3.adb (Build_Init_Statements): Simplify detection of
concurrent record types.
Diff:
---
gcc/ada/exp_ch3.adb | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 418306f3040..702c7da76e0 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -3206,9 +3206,7 @@ package body Exp_Ch3 is
-- types moving any expanded code from the spec to the body of the
-- init procedure.
- if Is_Task_Record_Type (Rec_Type)
- or else Is_Protected_Record_Type (Rec_Type)
- then
+ if Is_Concurrent_Record_Type (Rec_Type) then
declare
Decl : constant Node_Id :=
Parent (Corresponding_Concurrent_Type (Rec_Type));
@@ -3589,12 +3587,11 @@ package body Exp_Ch3 is
end loop;
end if;
end;
- end if;
-- For a protected type, add statements generated by
-- Make_Initialize_Protection.
- if Is_Protected_Record_Type (Rec_Type) then
+ elsif Is_Protected_Record_Type (Rec_Type) then
Append_List_To (Stmts,
Make_Initialize_Protection (Rec_Type));
end if;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-11 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 13:39 [gcc r12-4297] [Ada] Simplify initialization of concurrent components Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).