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

Compiler Bug: boost::too_few_args #2207

Closed
fruffy opened this issue Feb 22, 2020 · 3 comments
Closed

Compiler Bug: boost::too_few_args #2207

fruffy opened this issue Feb 22, 2020 · 3 comments

Comments

@fruffy
Copy link
Collaborator

fruffy commented Feb 22, 2020

Similar to #2206, the attached program leads to a boost error after the FrontEnd_9_CheckNamedArgs pass.
I think because of the slice operation the FrontEnd_4_ResolveReferences does not detect that the width of the expression is unknown?
b.p4.txt

@mihaibudiu mihaibudiu added the bug This behavior is unintended and should be fixed. label Feb 24, 2020
@mihaibudiu
Copy link
Contributor

I cannot reproduce this issue.

$ ./p4test --top4 4 issue2207.p4
issue2207.p4(25): error: ~: Operation cannot be applied to values with unknown width;
please specify width explicitly
        h.h.a = ~(0 << 8w1);
                ^^^^^^^^^^^

Are you running the latest version of the compiler?
The error you are indicating suggests a bug in an error message format; we have recently merged a change in the way error message formats are handled.

@mihaibudiu mihaibudiu removed the bug This behavior is unintended and should be fixed. label Feb 24, 2020
@mihaibudiu
Copy link
Contributor

BTW: compilation does not reach pass 9, it stops in pass 5. So I don't know how you reached FrontEnd_9.

@fruffy
Copy link
Collaborator Author

fruffy commented Feb 25, 2020

I rebuilt and tried to reproduce this. I can't and I also cannot identify the commit that might have caused this. Seems like a fluke.

@fruffy fruffy closed this as completed Feb 25, 2020
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

No branches or pull requests

2 participants