actions.c (chill_expand_assignment): Use powersetlen to calculate the length of an...
authorDave Brolley <brolley@cygnus.com>
Tue, 4 May 1999 11:56:26 +0000 (11:56 +0000)
committerDave Brolley <brolley@gcc.gnu.org>
Tue, 4 May 1999 11:56:26 +0000 (07:56 -0400)
Tue May  4 14:52:53 1999  Dave Brolley  <brolley@cygnus.com>
* actions.c (chill_expand_assignment): Use powersetlen to calculate the
length of an array of packed bits.

From-SVN: r26767

gcc/ch/ChangeLog
gcc/ch/actions.c

index 686c321bf5ef888e8bbe6e0feecd996f2efc4fc5..a4a0710839eb21ee248c3f4e543f5989893a58d3 100644 (file)
@@ -1,3 +1,8 @@
+Tue May  4 14:52:53 1999  Dave Brolley  <brolley@cygnus.com>
+
+       * actions.c (chill_expand_assignment): Use powersetlen to calculate the
+       length of an array of packed bits.
+
 Tue Apr 20 23:37:01 1999   Nathan Sidwell  <nathan@acm.org>
 
        * Make-lang.in (ch/chill.info): Put MAKEINFO parameters in correct
index 132dbd0b7e82e34c78c491bb56e048a7f7b1be75..4104ce7a86b5e6f954919f9b68024d907fc74e0b 100644 (file)
@@ -1706,11 +1706,7 @@ chill_expand_assignment (lhs, modifycode, rhs)
       tree from_pos = save_expr (TREE_OPERAND (lhs, 1));
       tree array = TREE_OPERAND (lhs, 0);
       tree domain = TYPE_DOMAIN (TREE_TYPE (array));
-      tree array_length = size_binop (PLUS_EXPR,
-                                   size_binop (MINUS_EXPR,
-                                               TYPE_MAX_VALUE (domain),
-                                               TYPE_MIN_VALUE (domain)),
-                                   integer_one_node);
+      tree array_length = powersetlen (array);
       tree filename = force_addr_of (get_chill_filename());
       expand_expr_stmt (
        build_chill_function_call (lookup_name (