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]
Other format: [Raw text]

Fix checking failure in immediate_use()


When there is no dataflow information, immediate_use() should return
NULL directly, not abort.

Tested on x86-64.


Diego.


	* tree-flow-inline.h (num_immediate_uses): Don't abort if DF
	is NULL.

Index: tree-flow-inline.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-flow-inline.h,v
retrieving revision 2.1
diff -d -c -p -r2.1 tree-flow-inline.h
*** tree-flow-inline.h	13 May 2004 06:39:48 -0000	2.1
--- tree-flow-inline.h	21 May 2004 14:44:50 -0000
*************** num_immediate_uses (dataflow_t df)
*** 295,300 ****
--- 295,303 ----
  static inline tree
  immediate_use (dataflow_t df, int num)
  {
+   if (!df)
+     return NULL_TREE;
+ 
  #ifdef ENABLE_CHECKING
    if (num >= num_immediate_uses (df))
      abort ();


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