This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: TREE_INT_CST_LOW stuff and related


I checked in this fix.  An array CONSTRUCTOR may not have entries for all
the elements of an array.

2000-03-08  Jason Merrill  <jason@casey.cygnus.com>

	* expr.c (expand_expr, case ARRAY_REF): Still check for missing
	CONSTRUCTOR element.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.210
diff -c -p -r1.210 expr.c
*** expr.c	2000/03/07 11:41:19	1.210
--- expr.c	2000/03/08 15:57:46
*************** expand_expr (exp, target, tmode, modifie
*** 6523,6529 ****
  		    tree elem = CONSTRUCTOR_ELTS (init);
  
  		    for (elem = CONSTRUCTOR_ELTS (init);
! 			 ! tree_int_cst_equal (TREE_PURPOSE (elem), index);
  			 elem = TREE_CHAIN (elem))
  		      ;
  
--- 6523,6530 ----
  		    tree elem = CONSTRUCTOR_ELTS (init);
  
  		    for (elem = CONSTRUCTOR_ELTS (init);
! 			 (elem
! 			  && !tree_int_cst_equal (TREE_PURPOSE (elem), index));
  			 elem = TREE_CHAIN (elem))
  		      ;
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]