public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] Minor adjustment in assignment case
@ 2020-07-07  1:01 Alexandre Oliva
  0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2020-07-07  1:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:95c9c1c0dcbe4b9bfd9ff8fcdf44d799ffcf6275

commit 95c9c1c0dcbe4b9bfd9ff8fcdf44d799ffcf6275
Author: Eric Botcazou <ebotcazou@gcc.gnu.org>
Date:   Tue Jun 23 17:17:50 2020 +0200

    Minor adjustment in assignment case
    
    gcc/ada/ChangeLog:
            * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Do
            not test Is_Bit_Packed_Array in the memset path.

Diff:
---
 gcc/ada/gcc-interface/trans.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 313a2fbcbaf..a64b6d00d00 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -7282,10 +7282,8 @@ gnat_to_gnu (Node_Id gnat_node)
 	      : gnat_expr;
 	  const Entity_Id gnat_type
 	    = Underlying_Type (Etype (Name (gnat_node)));
-	  const bool regular_array_type_p
-	    = Is_Array_Type (gnat_type) && !Is_Bit_Packed_Array (gnat_type);
 	  const bool use_memset_p
-	    = regular_array_type_p
+	    = Is_Array_Type (gnat_type)
 	      && Nkind (gnat_inner) == N_Aggregate
 	      && Is_Single_Aggregate (gnat_inner);
 
@@ -7356,7 +7354,8 @@ gnat_to_gnu (Node_Id gnat_node)
 	     not completely disjoint, play safe and use memmove.  But don't do
 	     it for a bit-packed array as it might not be byte-aligned.  */
 	  if (TREE_CODE (gnu_result) == MODIFY_EXPR
-	      && regular_array_type_p
+	      && Is_Array_Type (gnat_type)
+	      && !Is_Bit_Packed_Array (gnat_type)
 	      && !(Forwards_OK (gnat_node) && Backwards_OK (gnat_node)))
 	    {
 	      tree to = TREE_OPERAND (gnu_result, 0);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-07  1:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  1:01 [gcc(refs/users/aoliva/heads/testme)] Minor adjustment in assignment case Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).