]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: fix logic for name comparison in are_packs_equivalent [PR algol68/123653]
authorJose E. Marchesi <jemarch@gnu.org>
Sat, 17 Jan 2026 20:12:24 +0000 (21:12 +0100)
committerJose E. Marchesi <jemarch@gnu.org>
Sat, 17 Jan 2026 20:14:07 +0000 (21:14 +0100)
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

PR algol68/123653
* a68-parser-moids-equivalence.cc (are_packs_equivalent): Fix
logic in name comparison.

gcc/algol68/a68-parser-moids-equivalence.cc

index c022f9cb67324b27c81a332f2cd52bd96ea31e46..260eb4209a6a9efd5297b10cc4c0177f30708626 100644 (file)
@@ -50,9 +50,9 @@ are_packs_equivalent (PACK_T *s, PACK_T *t,
       if (compare_names)
        {
          if (TEXT (s) != TEXT (t)
-             && TEXT (s) != NO_TEXT
-             && TEXT (t) != NO_TEXT
-             && strcmp (TEXT (s), TEXT (t)) != 0)
+             && !(TEXT (s) != NO_TEXT
+                  && TEXT (t) != NO_TEXT
+                  && strcmp (TEXT (s), TEXT (t)) == 0))
            return false;
        }
     }