diff --git a/test/empstruct.cb b/test/empstruct.cb new file mode 100644 index 0000000..e331f2c --- /dev/null +++ b/test/empstruct.cb @@ -0,0 +1,13 @@ +import stdio; + +struct s {}; + +int +main(int argc, char **argv) +{ + struct s st; + struct s* p = &st; + + printf("%p\n", p); + return 0; +} diff --git a/test/test.sh b/test/test.sh index f5954a4..4cc68e8 100755 --- a/test/test.sh +++ b/test/test.sh @@ -153,6 +153,7 @@ assert_compile_error array-semcheck2.cb assert_out "11;22" ./struct assert_stat 0 ./struct-semcheck +assert_status 0 $CBC empstruct.cb assert_compile_error struct-semcheck2.cb assert_compile_error struct-semcheck3.cb assert_compile_error struct-semcheck4.cb