-
Notifications
You must be signed in to change notification settings - Fork 452
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
[bmv2] Unexpected modification of variable's value #242
Labels
fixed
This topic is considered to be fixed.
Comments
@ChrisDodd: I think that this is a problem with the LocalCopyPropagation.
Code after LCP:
The issue seems to be that val.field1 is assigned to, but this does not invalidate inc, which does depend on val.field1. |
mihaibudiu
pushed a commit
to mihaibudiu/p4c-clone
that referenced
this issue
Jan 26, 2017
Merged
ChrisDodd
pushed a commit
that referenced
this issue
Jan 26, 2017
* Remove unused variable * EBPF back-end improvements * Reproduction case for issue #242 * Added missing return value
Merged
ChrisDodd
pushed a commit
to ChrisDodd/p4c
that referenced
this issue
Feb 2, 2017
- propagate into rhs of assignment before left kill copies - don't propagate values that are recursive
ChrisDodd
pushed a commit
to ChrisDodd/p4c
that referenced
this issue
Feb 3, 2017
- propagate into rhs of assignment before left kill copies - don't propagate values that are recursive
ChrisDodd
pushed a commit
to ChrisDodd/p4c
that referenced
this issue
Feb 3, 2017
- propagate into rhs of assignment before left kill copies - don't propagate values that are recursive
ChrisDodd
pushed a commit
to ChrisDodd/p4c
that referenced
this issue
Feb 4, 2017
- propagate into rhs of assignment before left kill copies - don't propagate values that are recursive
mihaibudiu
pushed a commit
to mihaibudiu/p4c-clone
that referenced
this issue
Feb 6, 2017
ChrisDodd
pushed a commit
that referenced
this issue
Feb 6, 2017
Verified as fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relevant code with debug "print" statements:
Expected output reading
debug
from CLI:Observed output:
This seems to suggest that updating
val.field1
also updatedinc
and_pred
, even though both were set several lines earlier. My hunch is that this is a compiler issue.Source p4 and json:
test_bug4.json.txt
test_bug4.p4.txt
The text was updated successfully, but these errors were encountered: