From 35403645e4f1fb9242f9fb2aab432e4045eb2d0f Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 29 Mar 2005 16:16:09 +0000 Subject: [PATCH] 2005-03-29 Robert Dewar * exp_util.adb (Remove_Side_Effects): Properly propagate arguments to recursive calls. (Is_Possibly_Unaligned_Object): Correct typo that resulted in inaccurate result for unaligned scalars within records. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97173 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/exp_util.adb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 5ef5bae..4868dc1 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -2386,8 +2386,8 @@ package body Exp_Util is -- component of the record, then the component may be unaligned. if Is_Packed (Etype (P)) - and then Represented_As_Scalar (Etype (P)) - and then First_Entity (Etype (Entity (P))) /= C + and then Represented_As_Scalar (Etype (C)) + and then First_Entity (Scope (C)) /= C then return True; end if; @@ -3212,7 +3212,7 @@ package body Exp_Util is -- At the current time, the only types that we return False for (i.e. -- where we decide we know they cannot generate large temps) are ones - -- where we know the size is 128 bits or less at compile time, and we + -- where we know the size is 256 bits or less at compile time, and we -- are still not doing a thorough job on arrays and records ??? function May_Generate_Large_Temp (Typ : Entity_Id) return Boolean is @@ -3295,7 +3295,7 @@ package body Exp_Util is E : Node_Id; function Side_Effect_Free (N : Node_Id) return Boolean; - -- Determines if the tree N represents an expession that is known + -- Determines if the tree N represents an expression that is known -- not to have side effects, and for which no processing is required. function Side_Effect_Free (L : List_Id) return Boolean; @@ -3639,7 +3639,7 @@ package body Exp_Util is elsif Nkind (Exp) = N_Unchecked_Type_Conversion and then Nkind (Expression (Exp)) = N_Explicit_Dereference then - Remove_Side_Effects (Expression (Exp), Variable_Ref); + Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref); Scope_Suppress := Svg_Suppress; return; @@ -3647,7 +3647,7 @@ package body Exp_Util is -- the side effects in the expression. This is important in several -- circumstances: for change of representations, and also when this -- is a view conversion to a smaller object, where gigi can end up - -- its own temporary of the wrong size. + -- creating its own temporary of the wrong size. -- ??? this transformation is inhibited for elementary types that are -- not involved in a change of representation because it causes @@ -3657,7 +3657,7 @@ package body Exp_Util is and then (not Is_Elementary_Type (Underlying_Type (Exp_Type)) or else Nkind (Parent (Exp)) = N_Assignment_Statement) then - Remove_Side_Effects (Expression (Exp), Variable_Ref); + Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref); Scope_Suppress := Svg_Suppress; return; -- 2.7.4