analyzer: add regression test for PR 98073
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 6 Jan 2021 01:53:40 +0000 (20:53 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 6 Jan 2021 01:53:40 +0000 (20:53 -0500)
This ICE was fixed by r11-2694-g808f4dfeb3a95f50 (aka the big state
rewrite for GCC 11).

gcc/testsuite/ChangeLog:
PR analyzer/98073
* gcc.dg/analyzer/pr98073.c: New test.

gcc/testsuite/gcc.dg/analyzer/pr98073.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/analyzer/pr98073.c b/gcc/testsuite/gcc.dg/analyzer/pr98073.c
new file mode 100644 (file)
index 0000000..abbda09
--- /dev/null
@@ -0,0 +1,13 @@
+struct ist {
+  char ptr;
+  long len;
+} __trans_tmp_1, http_update_host_authority;
+int http_update_host_sl_0_0_0;
+void http_update_host(const struct ist uri) {
+  uri.len || uri.ptr;
+  if (http_update_host_sl_0_0_0) {
+    http_update_host_authority = __trans_tmp_1;
+    !http_update_host_authority.len;
+  } else
+    http_update_host_authority = uri;
+}