Skip to content

Commit fa8291f

Browse files
Update testsizeof.cpp
1 parent 0fe3a5f commit fa8291f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testsizeof.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,12 @@ class TestSizeof : public TestFixture {
722722
" return AtomName;\n"
723723
"}");
724724
ASSERT_EQUALS("", errout_str());
725+
726+
check("void* f(size_t n) {\n" // #11754
727+
" char* p = malloc(n * sizeof(void*));\n"
728+
" return p;\n"
729+
"}");
730+
ASSERT_EQUALS("", errout_str());
725731
}
726732

727733
void checkPointerSizeofStruct() {

0 commit comments

Comments
 (0)