parent
eefa04c7af
commit
2b611709e2
|
@ -189,6 +189,7 @@ private:
|
|||
TEST_CASE(array_index_62); // #7684
|
||||
TEST_CASE(array_index_63); // #10979
|
||||
TEST_CASE(array_index_64); // #10878
|
||||
TEST_CASE(array_index_65); // #11066
|
||||
TEST_CASE(array_index_multidim);
|
||||
TEST_CASE(array_index_switch_in_for);
|
||||
TEST_CASE(array_index_for_in_for); // FP: #2634
|
||||
|
@ -1822,6 +1823,18 @@ private:
|
|||
TODO_ASSERT_EQUALS("[test.cpp:3]: (error) Array 'x[10]' accessed at index 10, which is out of bounds.\n", "", errout.str());
|
||||
}
|
||||
|
||||
void array_index_65() // #11066
|
||||
{
|
||||
check("char P[] = { 2, 1 };\n"
|
||||
"char f[2];\n"
|
||||
"void e(char* c) {\n"
|
||||
" register j;\n"
|
||||
" for (j = 0; j < 2; j++)\n"
|
||||
" c[j] = f[P[j] - 1];\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void array_index_multidim() {
|
||||
check("void f()\n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue