Commit 88438c0e by Arnaud Charlet Committed by Arnaud Charlet

exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Disable expansion…

exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Disable expansion when generating C code.

2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
	Disable expansion when generating C code.
	* sinfo.ads, inline.ads: Minor editing.

From-SVN: r235247
parent c37e6613
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
Disable expansion when generating C code.
* sinfo.ads, inline.ads: Minor editing.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com> 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
......
...@@ -6352,30 +6352,27 @@ package body Exp_Attr is ...@@ -6352,30 +6352,27 @@ package body Exp_Attr is
-- Start of processing for Float_Valid -- Start of processing for Float_Valid
begin begin
case Float_Rep (Btyp) is -- The C and AAMP back-ends handle Valid for fpt types
-- The AAMP back end handles Valid for floating-point types if Generate_C_Code or else Float_Rep (Btyp) = AAMP then
when AAMP =>
Analyze_And_Resolve (Pref, Ptyp); Analyze_And_Resolve (Pref, Ptyp);
Set_Etype (N, Standard_Boolean); Set_Etype (N, Standard_Boolean);
Set_Analyzed (N); Set_Analyzed (N);
when IEEE_Binary => else
Find_Fat_Info (Ptyp, Ftp, Pkg); Find_Fat_Info (Ptyp, Ftp, Pkg);
-- If the prefix is a reverse SSO component, or is -- If the prefix is a reverse SSO component, or is possibly
-- possibly unaligned, first create a temporary copy -- unaligned, first create a temporary copy that is in
-- that is in native SSO, and properly aligned. Make it -- native SSO, and properly aligned. Make it Volatile to
-- Volatile to prevent folding in the back-end. Note -- prevent folding in the back-end. Note that we use an
-- that we use an intermediate constrained string type -- intermediate constrained string type to initialize the
-- to initialize the temporary, as the value at hand -- temporary, as the value at hand might be invalid, and in
-- might be invalid, and in that case it cannot be copied -- that case it cannot be copied using a floating point
-- using a floating point register. -- register.
if In_Reverse_Storage_Order_Object (Pref) if In_Reverse_Storage_Order_Object (Pref)
or else or else Is_Possibly_Unaligned_Object (Pref)
Is_Possibly_Unaligned_Object (Pref)
then then
declare declare
Temp : constant Entity_Id := Temp : constant Entity_Id :=
...@@ -6441,7 +6438,7 @@ package body Exp_Attr is ...@@ -6441,7 +6438,7 @@ package body Exp_Attr is
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => Unchecked_Convert_To (Ftp, Pref), Prefix => Unchecked_Convert_To (Ftp, Pref),
Attribute_Name => Name_Unrestricted_Access))); Attribute_Name => Name_Unrestricted_Access)));
end case; end if;
-- One more task, we still need a range check. Required -- One more task, we still need a range check. Required
-- only if we have a constraint, since the Valid routine -- only if we have a constraint, since the Valid routine
......
...@@ -74,9 +74,9 @@ package Inline is ...@@ -74,9 +74,9 @@ package Inline is
-- must be inhibited. -- must be inhibited.
Current_Sem_Unit : Unit_Number_Type; Current_Sem_Unit : Unit_Number_Type;
-- The semantic unit within which the instantiation is found. Must -- The semantic unit within which the instantiation is found. Must be
-- be restored when compiling the body, to insure that internal enti- -- restored when compiling the body, to insure that internal entities
-- ties use the same counter and are unique over spec and body. -- use the same counter and are unique over spec and body.
Scope_Suppress : Suppress_Record; Scope_Suppress : Suppress_Record;
Local_Suppress_Stack_Top : Suppress_Stack_Entry_Ptr; Local_Suppress_Stack_Top : Suppress_Stack_Entry_Ptr;
......
...@@ -879,9 +879,9 @@ package Sinfo is ...@@ -879,9 +879,9 @@ package Sinfo is
-- Present in subprogram declarations. Denotes analyzed but unexpanded -- Present in subprogram declarations. Denotes analyzed but unexpanded
-- body of subprogram, to be used when inlining calls. Present when the -- body of subprogram, to be used when inlining calls. Present when the
-- subprogram has an Inline pragma and inlining is enabled. If the -- subprogram has an Inline pragma and inlining is enabled. If the
-- declaration is completed by a renaming_as_body, and the renamed en- -- declaration is completed by a renaming_as_body, and the renamed entity
-- tity is a subprogram, the Body_To_Inline is the name of that entity, -- is a subprogram, the Body_To_Inline is the name of that entity, which
-- which is used directly in later calls to the original subprogram. -- is used directly in later calls to the original subprogram.
-- Body_Required (Flag13-Sem) -- Body_Required (Flag13-Sem)
-- A flag that appears in the N_Compilation_Unit node indicating that -- A flag that appears in the N_Compilation_Unit node indicating that
......
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