This commit is contained in:
chrchr-github 2022-01-06 15:19:10 +01:00 committed by GitHub
parent 303b85c043
commit 6c55f9cf88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -4943,6 +4943,14 @@ private:
" return p[4];\n"
"}\n");
ASSERT_EQUALS("", errout.str());
check("struct S { uint8_t padding[500]; };\n" // #10133
"S s = { 0 };\n"
"uint8_t f() {\n"
" uint8_t* p = (uint8_t*)&s;\n"
" return p[10];\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
};