https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80593

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|NEW                         |ASSIGNED
                 CC|                            |rguenth at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> The set1 == 0 stuff has been added in r136679.

Yep, to not regress some -Wstrict-aliasing testcase I think.  I'll test

Index: gcc/c-family/c-warn.c
===================================================================
--- gcc/c-family/c-warn.c       (revision 248179)
+++ gcc/c-family/c-warn.c       (working copy)
@@ -537,10 +537,10 @@ strict_aliasing_warning (tree otype, tre
            = get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0)));
          alias_set_type set2 = get_alias_set (TREE_TYPE (type));

-         if (set1 != set2 && set2 != 0
-             && (set1 == 0
-                 || (!alias_set_subset_of (set2, set1)
-                     && !alias_sets_conflict_p (set1, set2))))
+         if (set2 != 0
+             && set1 != set2
+             && !alias_set_subset_of (set2, set1)
+             && !alias_sets_conflict_p (set1, set2))
            {
              warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
                       "pointer will break strict-aliasing rules");

Reply via email to