Commit 3af796b5 by Javier Miranda Committed by Pierre-Marie de Rodat

[Ada] Adding support for unsupported type conversions in CCG

2019-12-13  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* exp_unst.adb (Unnest_Subprogram): Generate an extra temporary
	to facilitate the C backend processing dereferences.

From-SVN: r279361
parent 48f05f09
2019-12-13 Javier Miranda <miranda@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Generate an extra temporary
to facilitate the C backend processing dereferences.
2019-12-13 Javier Miranda <miranda@adacore.com>
* sem_prag.adb (Analyze_Pragma): Propagate the
Linker_Section_Attribute to the ultimate alias of the subprogram
to facilitate the C backend processing this attribute.
......
......@@ -27,6 +27,7 @@ with Atree; use Atree;
with Debug; use Debug;
with Einfo; use Einfo;
with Elists; use Elists;
with Exp_Util; use Exp_Util;
with Lib; use Lib;
with Namet; use Namet;
with Nlists; use Nlists;
......@@ -2345,6 +2346,18 @@ package body Exp_Unst is
-- expect any exceptions)
Analyze_And_Resolve (UPJ.Ref, Typ, Suppress => All_Checks);
-- Generate an extra temporary to facilitate the C backend
-- processing this dereference
if Opt.Modify_Tree_For_C
and then Nkind_In (Parent (UPJ.Ref),
N_Type_Conversion,
N_Unchecked_Type_Conversion)
then
Force_Evaluation (UPJ.Ref, Mode => Strict);
end if;
Pop_Scope;
end Rewrite_One_Ref;
end;
......
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