Skip to content
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

Values with type int are legal constants #3408

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Conversation

mihaibudiu
Copy link
Contributor

Signed-off-by: Mihai Budiu [email protected]
Fixes #3394

@mihaibudiu mihaibudiu requested a review from fruffy June 28, 2022 01:41
Copy link
Collaborator

@fruffy fruffy left a comment

Choose a reason for hiding this comment

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

The CI failure is a little suspect to me. Even though an error is thrown the constant is replaced with a header variable. This could lead to a different matching outcome?

@@ -227,6 +227,7 @@ bool ToP4::preorder(const IR::Type_Var* t) {

bool ToP4::preorder(const IR::Type_Unknown*) {
BUG("Cannot emit code for an unknown type");
// builder.append("*unknown type*");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment? Is this related to the changes below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not really, but when debugging a problem I found it useful to be able not to crash when dumping an illegal IR representation.

Signed-off-by: Mihai Budiu <[email protected]>
@mihaibudiu
Copy link
Contributor Author

yes, there was a bug in the code, I fixed it.

@mihaibudiu mihaibudiu requested a review from fruffy June 28, 2022 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler Bug: "Null cst" due to incorrect inf_int control parameter handling
2 participants