Commit ae56e442 by Tristan Gingold Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): Always build a variable for E_Variable with a pragma Linker_Section.

	* gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
	for E_Variable with a pragma Linker_Section.

From-SVN: r207072
parent 3a70ba74
2014-01-25 Tristan Gingold <gingold@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
for E_Variable with a pragma Linker_Section.
2014-01-25 Robert Dewar <dewar@adacore.com> 2014-01-25 Robert Dewar <dewar@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
......
...@@ -575,9 +575,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -575,9 +575,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* Simple variables, loop variables, Out parameters and exceptions. */ /* Simple variables, loop variables, Out parameters and exceptions. */
object: object:
{ {
/* Always create a variable for volatile objects and variables seen
constant but with a Linker_Section pragma. */
bool const_flag bool const_flag
= ((kind == E_Constant || kind == E_Variable) = ((kind == E_Constant || kind == E_Variable)
&& Is_True_Constant (gnat_entity) && Is_True_Constant (gnat_entity)
&& !(kind == E_Variable
&& Present (Linker_Section_Pragma (gnat_entity)))
&& !Treat_As_Volatile (gnat_entity) && !Treat_As_Volatile (gnat_entity)
&& (((Nkind (Declaration_Node (gnat_entity)) && (((Nkind (Declaration_Node (gnat_entity))
== N_Object_Declaration) == N_Object_Declaration)
......
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