From 23fc2be633c61f24a4fbd4096c669e7147ca44ae Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 5 Jan 2021 20:53:40 -0500 Subject: [PATCH] analyzer: add regression test for PR 98073 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/analyzer/pr98073.c diff --git a/gcc/testsuite/gcc.dg/analyzer/pr98073.c b/gcc/testsuite/gcc.dg/analyzer/pr98073.c new file mode 100644 index 00000000000..abbda09bf99 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/pr98073.c @@ -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; +} -- 2.30.2