public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1806] analyzer: fix ICE in binding_cluster ctor [PR106401]
@ 2022-07-22 23:52 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2022-07-22 23:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0fb35a45a28c674d5d420528f7dec629e42b4850

commit r13-1806-g0fb35a45a28c674d5d420528f7dec629e42b4850
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Fri Jul 22 19:50:37 2022 -0400

    analyzer: fix ICE in binding_cluster ctor [PR106401]
    
    gcc/analyzer/ChangeLog:
            PR analyzer/106401
            * store.cc (binding_cluster::binding_cluster): Remove overzealous
            assertion; we're checking for tracked_p in
            store::get_or_create_cluster.
    
    gcc/testsuite/ChangeLog:
            PR analyzer/106401
            * gcc.dg/analyzer/memcpy-2.c: New test.
    
    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

Diff:
---
 gcc/analyzer/store.cc                    | 1 -
 gcc/testsuite/gcc.dg/analyzer/memcpy-2.c | 8 ++++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/analyzer/store.cc b/gcc/analyzer/store.cc
index e3dabf300df..0b3fb370d1e 100644
--- a/gcc/analyzer/store.cc
+++ b/gcc/analyzer/store.cc
@@ -1107,7 +1107,6 @@ binding_cluster::binding_cluster (const region *base_region)
 : m_base_region (base_region), m_map (),
   m_escaped (false), m_touched (false)
 {
-  gcc_assert (base_region->tracked_p ());
 }
 
 /* binding_cluster's copy ctor.  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/memcpy-2.c b/gcc/testsuite/gcc.dg/analyzer/memcpy-2.c
new file mode 100644
index 00000000000..88ec84cb640
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/memcpy-2.c
@@ -0,0 +1,8 @@
+/* { dg-additional-options "-Wno-stringop-overflow" } */
+
+void
+main (int c, void *v)
+{
+  static char a[] = "";
+  __builtin_memcpy (v, a, -1);
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-22 23:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 23:52 [gcc r13-1806] analyzer: fix ICE in binding_cluster ctor [PR106401] David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).