Commit 20aa9a35 by Dave Brolley Committed by Dave Brolley

typeck.c (build_chill_slice): Always use TYPE_DOMAIN to get the domain type of the array.

Mon Sep 14 16:46:36 1998  Dave Brolley  <brolley@cygnus.com>
	* typeck.c (build_chill_slice): Always use TYPE_DOMAIN to get the
	domain type of the array.

From-SVN: r22420
parent e12994ab
Mon Sep 14 16:46:36 1998 Dave Brolley <brolley@cygnus.com> Mon Sep 14 16:46:36 1998 Dave Brolley <brolley@cygnus.com>
* typeck.c (build_chill_slice): Always use TYPE_DOMAIN to get the
domain type of the array.
* expr.c (build_chill_function_call): Remove redundant call to * expr.c (build_chill_function_call): Remove redundant call to
chill_convert_to_assignment chill_convert_to_assignment
......
...@@ -237,18 +237,12 @@ build_chill_slice (array, min_value, length) ...@@ -237,18 +237,12 @@ build_chill_slice (array, min_value, length)
if (TREE_CODE (array_type) == ARRAY_TYPE) if (TREE_CODE (array_type) == ARRAY_TYPE)
{ {
tree domain_type = TYPE_DOMAIN (array_type); tree domain_type = TYPE_DOMAIN (array_type);
tree index_domain tree domain_min = TYPE_MIN_VALUE (domain_type);
= TREE_CODE (length) != INTEGER_CST || integer_zerop (length) tree domain_max = fold (build (PLUS_EXPR, domain_type,
? sizetype
: domain_type;
tree domain_min = convert (index_domain, TYPE_MIN_VALUE (domain_type));
tree domain_max = fold (build (PLUS_EXPR, index_domain,
domain_min, domain_min,
convert (index_domain, size_binop (MINUS_EXPR,
size_binop (MINUS_EXPR, length, integer_one_node)));
length, tree index_type = build_chill_range_type (TYPE_DOMAIN (array_type),
integer_one_node))));
tree index_type = build_chill_range_type (domain_type,
domain_min, domain_min,
domain_max); domain_max);
......
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