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]

[PATCH] Fix PR39207, bogus alias warnings again


We shouldn't warn about dereferecing { NULL } with a strict-aliasing
warning.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2009-02-17  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39207
	* tree-ssa-structalias.c (find_what_p_points_to): Do not emit
	strict-aliasing warnings for pointers pointing to NULL.

Index: gcc/tree-ssa-structalias.c
===================================================================
*** gcc/tree-ssa-structalias.c	(revision 144226)
--- gcc/tree-ssa-structalias.c	(working copy)
*************** find_what_p_points_to (tree p)
*** 4935,4940 ****
--- 4935,4941 ----
  	    {
  	      pi->pt_vars = NULL;
  	      if (pruned > 0
+ 		  && !pi->pt_null
  		  && pi->is_dereferenced
  		  && warn_strict_aliasing > 0
  		  && !SSA_NAME_IS_DEFAULT_DEF (p))


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