aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-structalias.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e30a668..d580020 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2009-02-16 Joseph Myers <joseph@codesourcery.com>
PR c/35446
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 03f7a4a..f9962b3 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4935,6 +4935,7 @@ find_what_p_points_to (tree p)
{
pi->pt_vars = NULL;
if (pruned > 0
+ && !pi->pt_null
&& pi->is_dereferenced
&& warn_strict_aliasing > 0
&& !SSA_NAME_IS_DEFAULT_DEF (p))