Skip to content

test for issue #3653 #3695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions regression/cbmc/Struct_Initialization/flexible_array_member.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <assert.h>

struct f
{
int w;
int x[];
};

struct f f = {4, {0, 1, 2, 3}};

int main()
{
assert(sizeof(f) == sizeof(int));
assert(f.x[1] == 1);
return 0;
}
10 changes: 10 additions & 0 deletions regression/cbmc/Struct_Initialization/flexible_array_member.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
KNOWNBUG
main.c

^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring
--
Based on issue #3653.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide sufficient information in here (and in the commit message!) so that one doesn't have to go through extra hoops to figure out what this is about. Moreover, this isn't the same code as in the bug report and it's not clear whether both assertions in this test now fail or just one of them.