-
Notifications
You must be signed in to change notification settings - Fork 274
Check all struct members for possible need for renaming #3918
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
Check all struct members for possible need for renaming #3918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that sort of VL-struct might be a GNU extension, so wouldn't be surprised if MSVC starts cursing like a sailor
Clang does refuse to compile this, GCC is ok - I haven't actually tried MSVC. |
You might try:
To make the lack of renaming actually a problem, this needs to happen in a loop, and the size needs to differ between iterations. |
BTW, my plan is to add a goto-program transformation pass that compiles these away. They add a lot of grief for a feature that has very few users. |
Thanks, I have built a test that seems to fail, but actually it fails even without the recent optimisation. I'll work on it. |
Don't stop after the first non-pointer element. But really it worked either way, because struct tags are in place everywhere and we don't actually need to rename.
An array_size symbol should be of type size_type(), and we can safely rely on common logic to find fresh symbols.
The test currently fails an invariant in the array decision procedure.
51c44e6
to
4381f04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 51c44e6).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98498677
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
I have added failing tests, but might actually deal with them in separate PRs. |
The mapping from L1 names to types is not in line with the different types used across loop iterations.
4381f04
to
e98554b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: e98554b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98516182
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
Follow-up to #3633. I'm not labelling this "bugfix" as I wasn't actually able to trigger a bug, even though there are changes that make it seem more correct.