Commit 44059479 by Eric Botcazou Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): Pass the list of attributes when building the…

decl.c (gnat_to_gnu_entity): Pass the list of attributes when building the corresponding variable of a constant.

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Pass the list
	of attributes when building the corresponding variable of a constant.
	* gcc-interface/utils.c (create_var_decl_1): Do not process attributes
	for constants.

From-SVN: r154458
parent c5b96638
2009-11-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Pass the list
of attributes when building the corresponding variable of a constant.
* gcc-interface/utils.c (create_var_decl_1): Do not process attributes
for constants.
2009-11-23 Eric Botcazou <ebotcazou@adacore.com>
Laurent GUERBY <laurent@guerby.net>
PR ada/42153
......
......@@ -1366,7 +1366,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
tree gnu_corr_var
= create_true_var_decl (gnu_entity_name, gnu_ext_name, gnu_type,
gnu_expr, true, Is_Public (gnat_entity),
!definition, static_p, NULL,
!definition, static_p, attr_list,
gnat_entity);
SET_DECL_CONST_CORRESPONDING_VAR (gnu_decl, gnu_corr_var);
......
......@@ -1404,10 +1404,12 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init,
!= null_pointer_node)
DECL_IGNORED_P (var_decl) = 1;
if (asm_name && VAR_OR_FUNCTION_DECL_P (var_decl))
SET_DECL_ASSEMBLER_NAME (var_decl, asm_name);
process_attributes (var_decl, attr_list);
if (TREE_CODE (var_decl) == VAR_DECL)
{
if (asm_name)
SET_DECL_ASSEMBLER_NAME (var_decl, asm_name);
process_attributes (var_decl, attr_list);
}
/* Add this decl to the current binding level. */
gnat_pushdecl (var_decl, gnat_node);
......
2009-11-23 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/weak1.ads: New test.
2009-11-23 Steve Ellcey <sje@cup.hp.com>
* gcc.dg/debug/dwarf2/inline2.c: Modify scan.
......
package Weak1 is
Myconst : constant Integer := 1234;
pragma Export (C, Myconst, "myconst");
pragma Weak_External (Myconst);
end Weak1;
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