Skip to content

Commit b211139

Browse files
Add test for #10092 (#3571)
1 parent 194a1be commit b211139

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/testbufferoverrun.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4759,6 +4759,16 @@ class TestBufferOverrun : public TestFixture {
47594759
" out_row[c] = vector<V, 2>(1,2);\n"
47604760
"}\n");
47614761
ASSERT_EQUALS("", errout.str());
4762+
4763+
check("void f(const uint8_t* d, const uint8_t L) {\n" // #10092
4764+
" for (uint8_t i = 0U; i < L; ++i)\n"
4765+
" g(d[i]);\n"
4766+
"}\n"
4767+
"void h() {\n"
4768+
" const uint8_t u = 4;\n"
4769+
" f(&u, N);\n"
4770+
"}");
4771+
ASSERT_EQUALS("", errout.str());
47624772
}
47634773
};
47644774

0 commit comments

Comments
 (0)