#6922 valueFlowForward does not terminate: xorg/driver/xf86-video-neomagic : src/neo_driver.c (invalid code). Add regression test for previously fixed bug.

This commit is contained in:
Alexander Mai 2015-10-18 11:52:25 +02:00
parent b81b21a57b
commit 8f07b2e440
1 changed files with 14 additions and 0 deletions

View File

@ -191,6 +191,7 @@ private:
TEST_CASE(garbageCode140); // #7035
TEST_CASE(garbageCode141); // #7043
TEST_CASE(garbageCode142); // #7050
TEST_CASE(garbageCode143); // #6922
TEST_CASE(garbageValueFlow);
TEST_CASE(garbageSymbolDatabase);
@ -1118,6 +1119,19 @@ private:
checkCode("{ } ( ) { void mapGraphs ( ) { node_t * n ; for (!oid n ) { } } } { }");
}
void garbageCode143() { // #6922
ASSERT_THROW(checkCode("void neoProgramShadowRegs() {\n"
" int i;\n"
" Bool noProgramShadowRegs;\n"
" if (noProgramShadowRegs) {\n"
" } else {\n"
" switch (nPtr->NeoPanelWidth) {\n"
" case 1280:\n"
" VGAwCR(0x64,0x?? );\n"
" }\n"
" }\n"
"}"), InternalError);
}
void garbageValueFlow() {
// #6089