Commit 76fa6b3b by Zack Weinberg Committed by Zack Weinberg

com.c (ffecom_overlap_): Set source_offset to bitsize_zero_node.

	* com.c (ffecom_overlap_): Set source_offset to
	bitsize_zero_node.
	(ffecom_tree_canonize_ptr_): Use size_binop.  Convert to
	bitsizetype before multiplying by TYPE_SIZE.
	(ffecom_tree_canonize_ref_) [case ARRAY_REF]: Break up offset
	calculation.  Convert to bitsizetype before multiplying by
	TYPE_SIZE.

From-SVN: r33730
parent ac670723
2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
* com.c (ffecom_overlap_): Set source_offset to
bitsize_zero_node.
(ffecom_tree_canonize_ptr_): Use size_binop. Convert to
bitsizetype before multiplying by TYPE_SIZE.
(ffecom_tree_canonize_ref_) [case ARRAY_REF]: Break up offset
calculation. Convert to bitsizetype before multiplying by
TYPE_SIZE.
2000-04-18 Zack Weinberg <zack@wolery.cumb.org> 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
* lex.c: Remove references to cccp.c. * lex.c: Remove references to cccp.c.
......
...@@ -1712,7 +1712,7 @@ ffecom_overlap_ (tree dest_decl, tree dest_offset, tree dest_size, ...@@ -1712,7 +1712,7 @@ ffecom_overlap_ (tree dest_decl, tree dest_offset, tree dest_size,
return TRUE; return TRUE;
source_decl = source_tree; source_decl = source_tree;
source_offset = size_zero_node; source_offset = bitsize_zero_node;
source_size = TYPE_SIZE (TREE_TYPE (TREE_TYPE (source_tree))); source_size = TYPE_SIZE (TREE_TYPE (TREE_TYPE (source_tree)));
break; break;
...@@ -9086,9 +9086,9 @@ ffecom_tree_canonize_ptr_ (tree *decl, tree *offset, ...@@ -9086,9 +9086,9 @@ ffecom_tree_canonize_ptr_ (tree *decl, tree *offset,
*offset, TREE_OPERAND (t, 1))); *offset, TREE_OPERAND (t, 1)));
/* Convert offset (presumably in bytes) into canonical units /* Convert offset (presumably in bytes) into canonical units
(presumably bits). */ (presumably bits). */
*offset = fold (build (MULT_EXPR, TREE_TYPE (*offset), *offset = size_binop (MULT_EXPR,
TYPE_SIZE (TREE_TYPE (TREE_TYPE (t))), convert (bitsizetype, *offset),
*offset)); TYPE_SIZE (TREE_TYPE (TREE_TYPE (t))));
break; break;
} }
/* Not a COMMON reference, so an unrecognized pattern. */ /* Not a COMMON reference, so an unrecognized pattern. */
...@@ -9249,18 +9249,17 @@ ffecom_tree_canonize_ref_ (tree *decl, tree *offset, ...@@ -9249,18 +9249,17 @@ ffecom_tree_canonize_ref_ (tree *decl, tree *offset,
|| (*decl == error_mark_node)) || (*decl == error_mark_node))
return; return;
*offset /* Calculate ((element - base) * NBBY) + init_offset. */
= size_binop (MULT_EXPR, *offset = fold (build (MINUS_EXPR, TREE_TYPE (element),
TYPE_SIZE (TREE_TYPE (TREE_TYPE (array))), element,
convert (sizetype, TYPE_MIN_VALUE (TYPE_DOMAIN
fold (build (MINUS_EXPR, TREE_TYPE (element), (TREE_TYPE (array)))));
element,
TYPE_MIN_VALUE *offset = size_binop (MULT_EXPR,
(TYPE_DOMAIN convert (bitsizetype, *offset),
(TREE_TYPE (array)))))));; TYPE_SIZE (TREE_TYPE (TREE_TYPE (array))));
*offset = size_binop (PLUS_EXPR, convert (sizetype, init_offset), *offset = size_binop (PLUS_EXPR, init_offset, *offset);
*offset);
*size = TYPE_SIZE (TREE_TYPE (t)); *size = TYPE_SIZE (TREE_TYPE (t));
return; return;
......
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