https://gcc.gnu.org/g:f50574b9c3e37cf21a0341d74b61a2d01625bb62

commit r17-6534-gf50574b9c3e37cf21a0341d74b61a2d01625bb62
Author: David Malcolm <[email protected]>
Date:   Fri Nov 20 20:27:22 2026 -0500

    analyzer: add regression test [PR109197]
    
    PR analyzer/109197 seems to have been fixed by r14-6419-g4eaaf7f5a378e8.
    
    Add test coverage for it remaining fixed.
    
    gcc/testsuite/ChangeLog:
            PR analyzer/109197
            * gcc.dg/analyzer/bitfields-pr109197.c: New test.
    
    Signed-off-by: David Malcolm <[email protected]>

Diff:
---
 gcc/testsuite/gcc.dg/analyzer/bitfields-pr109197.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/analyzer/bitfields-pr109197.c 
b/gcc/testsuite/gcc.dg/analyzer/bitfields-pr109197.c
new file mode 100644
index 000000000000..5a0b6bfece07
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/bitfields-pr109197.c
@@ -0,0 +1,16 @@
+/* Regression test for considering impossible path due to mishandling of
+   bitfields (PR analyzer/109197).  */
+
+#include "analyzer-decls.h"
+
+struct a
+{
+  int d : 10;
+} b;
+
+void e()
+{
+  b.d = 0;
+  if (b.d)
+    __analyzer_dump_path (); /* { dg-bogus "path" "PR analyzer/109197" } */
+}

Reply via email to