diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-09-29 16:10:23 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-10-11 13:38:10 +0000 |
commit | 1bafcab05cbff1cc98e3ca867b4474401eec729b (patch) | |
tree | 468bef0cc47ed5bd03c1c084f42fe88f9d6cf38f | |
parent | 90084d74007367a44ea8de99af80ea20b50bcb79 (diff) | |
download | gcc-1bafcab05cbff1cc98e3ca867b4474401eec729b.zip gcc-1bafcab05cbff1cc98e3ca867b4474401eec729b.tar.gz gcc-1bafcab05cbff1cc98e3ca867b4474401eec729b.tar.bz2 |
[Ada] Simplify initialization of concurrent components
gcc/ada/
* exp_ch3.adb (Build_Init_Statements): Simplify detection of
concurrent record types.
-rw-r--r-- | gcc/ada/exp_ch3.adb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 418306f..702c7da 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; |