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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Bad interaction of          |[11/12 Regression] Bad
                   |-fsanitize=undefined and    |interaction of
                   |-Wvla-parameters            |-fsanitize=undefined and
                   |                            |-Wvla-parameters
     Ever confirmed|0                           |1
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |11.1.0, 12.0
           Keywords|                            |diagnostic
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot 
gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-07-23

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  It looks like an oversight in r12-2329.  The following fixes it:

diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c
index 552a29f9944..7a50baedea9 100644
--- a/gcc/c-family/c-warn.c
+++ b/gcc/c-family/c-warn.c
@@ -3275,7 +3275,8 @@ warn_parm_ptrarray_mismatch (location_t origloc, tree
curparms, tree newparms)
          /* Move on if the bounds look the same.  */
          if (!pcurbndpos && !pnewbndpos
              && curbnd && newbnd
-             && operand_equal_p (curbnd, newbnd, OEP_LEXICOGRAPHIC))
+             && operand_equal_p (curbnd, newbnd, OEP_LEXICOGRAPHIC
+                                 | OEP_DECL_NAME))
            continue;

          if ((curbnd && TREE_CODE (curbnd) != INTEGER_CST)

Reply via email to