diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 10:54:01 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 10:54:01 +0000 |
commit | 83d39cd3661f8245aede1103a513136c5f39627f (patch) | |
tree | 7df3656031b815260fbd0eca9f3d1a79fbca4ba4 /gcc/ada/exp_ch3.adb | |
parent | ff9285665e5b7b7ee5c7a3be5425c7005684ed16 (diff) | |
download | gcc-83d39cd3661f8245aede1103a513136c5f39627f.tar.gz |
2015-10-26 Gary Dismukes <dismukes@adacore.com>
* sem_ch13.adb: Minor reformatting.
2015-10-26 Steve Baird <baird@adacore.com>
* exp_disp.adb: Omit most dispatch table initialization code
if Generate_SCIL is true.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* sinfo.ads, exp_ch3.adb: Revert previous change.
(Build_Record_Init_Proc): Do not build an aggregate if
Modify_Tree_For_C.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r-- | gcc/ada/exp_ch3.adb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 04d1fc821f9..6fb3a598351 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -760,10 +760,8 @@ package body Exp_Ch3 is -- want to inline, because nested stuff may cause difficulties in -- inter-unit inlining, and furthermore there is in any case no -- point in inlining such complex init procs. - -- Also do not inline in case of Modify_Tree_For_C where front-end - -- inlining is used and may not always play well with init procs. - if not Has_Task (Proc_Id) and then not Modify_Tree_For_C then + if not Has_Task (Proc_Id) then Set_Is_Inlined (Proc_Id); end if; @@ -3600,12 +3598,9 @@ package body Exp_Ch3 is -- In addition, when compiled for another unit for inlining purposes, -- it may make reference to entities that have not been elaborated -- yet. Similar considerations apply to task types. - -- Also do not inline in case of Modify_Tree_For_C where front-end - -- inlining is used and may not always play well with init procs. if not Is_Concurrent_Type (Rec_Type) and then not Has_Task (Rec_Type) - and then not Modify_Tree_For_C then Set_Is_Inlined (Proc_Id); end if; @@ -3617,6 +3612,14 @@ package body Exp_Ch3 is Set_Debug_Info_Off (Proc_Id); end if; + -- Do not build an aggregate if Modify_Tree_For_C, this isn't + -- needed and may generate early references to non frozen types + -- since we expand aggregate much more systematically. + + if Modify_Tree_For_C then + return; + end if; + declare Agg : constant Node_Id := Build_Equivalent_Record_Aggregate (Rec_Type); |