diff --git a/test/testcondition.cpp b/test/testcondition.cpp index f8c8c34c8..4c9df34bd 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -3481,6 +3481,14 @@ private: " if (y.empty()) return;\n" "}\n"); ASSERT_EQUALS("", errout.str()); + + // #9106 + check("struct A {int b;};\n" + "void f(A a, int c) {\n" + " if (a.b) a.b = c;\n" + " if (a.b) {}\n" + "}\n"); + ASSERT_EQUALS("", errout.str()); } void checkInvalidTestForOverflow() {