Commit bf7eefab by Eric Botcazou Committed by Eric Botcazou

re PR bootstrap/48216 (IRIX 6 Ada bootstrap broken: gnu_decl uninitialized in…

re PR bootstrap/48216 (IRIX 6 Ada bootstrap broken: gnu_decl uninitialized in gcc-interface/decl.c:elaborate_expression_1)

	PR bootstrap/48216
	* gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.

From-SVN: r171254
parent 31408f60
2011-03-21 Eric Botcazou <ebotcazou@adacore.com> 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
PR bootstrap/48216
* gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Add REORDER parameter, * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
to the end of the list. Adjust recursive call. Rename local variable. to the end of the list. Adjust recursive call. Rename local variable.
......
...@@ -6006,7 +6006,6 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name, ...@@ -6006,7 +6006,6 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name,
{ {
const bool expr_global_p = Is_Public (gnat_entity) || global_bindings_p (); const bool expr_global_p = Is_Public (gnat_entity) || global_bindings_p ();
bool expr_variable_p, use_variable; bool expr_variable_p, use_variable;
tree gnu_decl;
/* In most cases, we won't see a naked FIELD_DECL because a discriminant /* In most cases, we won't see a naked FIELD_DECL because a discriminant
reference will have been replaced with a COMPONENT_REF when the type reference will have been replaced with a COMPONENT_REF when the type
...@@ -6071,15 +6070,17 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name, ...@@ -6071,15 +6070,17 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name,
/* Now create it, possibly only for debugging purposes. */ /* Now create it, possibly only for debugging purposes. */
if (use_variable || need_debug) if (use_variable || need_debug)
gnu_decl {
= create_var_decl (create_concat_name (gnat_entity, tree gnu_decl
IDENTIFIER_POINTER (gnu_name)), = create_var_decl (create_concat_name (gnat_entity,
NULL_TREE, TREE_TYPE (gnu_expr), gnu_expr, IDENTIFIER_POINTER (gnu_name)),
!need_debug, Is_Public (gnat_entity), NULL_TREE, TREE_TYPE (gnu_expr), gnu_expr,
!definition, expr_global_p, NULL, gnat_entity); !need_debug, Is_Public (gnat_entity),
!definition, expr_global_p, NULL, gnat_entity);
if (use_variable)
return gnu_decl; if (use_variable)
return gnu_decl;
}
return expr_variable_p ? gnat_save_expr (gnu_expr) : gnu_expr; return expr_variable_p ? gnat_save_expr (gnu_expr) : gnu_expr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment