-
Notifications
You must be signed in to change notification settings - Fork 449
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
Compiler Bug: At this point in the compilation typechecking should not infer new types anymore, but it did. #2190
Comments
We should only add the numbers if they have the same type. |
A question about this strength reduction transformation that sometimes changes ((a >> b) >> c) to (a>> (b + c)). Could the transformation be done if the type of the expression (b+c) is |
Yes, with the current code this can happen. |
Please file another issue. |
Or perhaps let's fix it in this PR, just request changes. |
@fruffy can you catch this overflow bug? |
Yes, I tested it on the branch. I attached a sample program and stf file. |
Output of the tool once it detected a difference is something like this:
So the value of hdr.h.a after running through the control pipeline is 1 instead of 0. |
Hello again,
after commit 1159ced we encounter the compiler bug in the title for specific programs. I attached an example.
The exact command is
p4c/build/p4c -v bad_type_checking.p4
.bad_type_checking.p4.txt
The text was updated successfully, but these errors were encountered: