From: ebotcazou Date: Tue, 2 Oct 2012 10:34:44 +0000 (+0000) Subject: * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for X-Git-Tag: upstream/4.9.2~10254 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=549fe569949baa3281acbbc6c6b97431e305da7a;p=platform%2Fupstream%2Flinaro-gcc.git * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for bounds of loop iteraration scheme only for locally defined subtypes. * gcc-interface/trans.c (gigi): Fix formatting. (build_return_expr): Apply the NRV optimization only for BLKmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191971 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8fd7724..cddd55b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2012-10-02 Eric Botcazou + + * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for + bounds of loop iteraration scheme only for locally defined subtypes. + + * gcc-interface/trans.c (gigi): Fix formatting. + (build_return_expr): Apply the NRV optimization only for BLKmode. + 2012-10-02 Robert Dewar * par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb, diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 9e14d8a..3935bb3 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -6165,6 +6165,7 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name, use_variable = expr_variable_p && (expr_global_p || (!optimize + && definition && Is_Itype (gnat_entity) && Nkind (Associated_Node_For_Itype (gnat_entity)) == N_Loop_Parameter_Specification)); diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index c3e833e..d88f6ba 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -332,7 +332,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED, #ifdef ORDINARY_MAP_INSTANCE map = LINEMAPS_ORDINARY_MAP_AT (line_table, i); if (flag_debug_instances) - ORDINARY_MAP_INSTANCE(map) = file_info_ptr[i].Instance; + ORDINARY_MAP_INSTANCE (map) = file_info_ptr[i].Instance; #endif linemap_line_start (line_table, file_info_ptr[i].Num_Source_Lines, 252); linemap_position_for_column (line_table, 252 - 1); @@ -3158,6 +3158,7 @@ build_return_expr (tree ret_obj, tree ret_val) if (optimize && AGGREGATE_TYPE_P (operation_type) && !TYPE_IS_FAT_POINTER_P (operation_type) + && TYPE_MODE (operation_type) == BLKmode && aggregate_value_p (operation_type, current_function_decl)) { /* Recognize the temporary created for a return value with variable