public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Fix PR middle-end/18005.
@ 2004-10-19 10:17 Sebastian Pop
  0 siblings, 0 replies; only message in thread
From: Sebastian Pop @ 2004-10-19 10:17 UTC (permalink / raw)
  To: gcc-patches

Hello, 

The following patch fixes PR18005 by ensuring that the arguments of
EXACT_DIV_EXPR are INTEGER_CST.

Bootstrapped and tested on i686-pc-linux-gnu.

Sebastian

	* tree-data-ref.c (estimate_niter_from_size_of_data): Ensure 
	that arguments of EXACT_DIV_EXPR are INTEGER_CST.

Index: tree-data-ref.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-data-ref.c,v
retrieving revision 2.12
diff -d -u -p -r2.12 tree-data-ref.c
--- tree-data-ref.c	13 Oct 2004 11:58:10 -0000	2.12
+++ tree-data-ref.c	19 Oct 2004 09:52:09 -0000
@@ -513,11 +513,13 @@ estimate_niter_from_size_of_data (struct
   array_size = TYPE_SIZE (TREE_TYPE (opnd0));
   element_size = TYPE_SIZE (TREE_TYPE (TREE_TYPE (opnd0)));
   if (array_size == NULL_TREE 
-      || element_size == NULL_TREE)
+      || element_size == NULL_TREE
+      || TREE_CODE (array_size) != INTEGER_CST
+      || TREE_CODE (element_size) != INTEGER_CST)
     return;
 
   data_size = fold (build2 (EXACT_DIV_EXPR, integer_type_node, 
-			   array_size, element_size));
+			    array_size, element_size));
 
   if (init != NULL_TREE
       && step != NULL_TREE

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

only message in thread, other threads:[~2004-10-19 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19 10:17 [patch] Fix PR middle-end/18005 Sebastian Pop

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).