-
Notifications
You must be signed in to change notification settings - Fork 445
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 Null stat" also triggered in action properties #2266
Comments
Should you be allowed a function call in a binary op?
|
@boblytton I believe this has been allowed by the language specification for quite some time now. Section 8.1 "Expression evaluation order" specifies the order of evaluation, in case sub-expressions of an expression can have side effects. Do you see anything in that section that is missing, or ambiguous in some way? |
Hi @jafingerhut, sorry I should have been more specific, the front-end hits BUG_CHECK() in the example above. |
@boblytton I tried a couple of variations of the code you described with the latest master version of p4c as of now (2020-Apr-30), but did not experience any Compiler Bug messages or errors of any kind. If you can reproduce a BUG_CHECK() call, can you create a separate p4c issue with the exact program, command line, and output of |
@jafingerhut, I am still trying to track down where my issue is arising from, but as you say the latest p4c does not exhibit them - sorry for being too hasty. |
The root of my problem was disabling 'frontend side-effect ordering'. Cheers. |
A spec change could be the solution, outlawing such programs. |
PR #2259 does not catch function calls in action arguments. Are there any other table properties where this could occur?
2258b.p4.txt
The text was updated successfully, but these errors were encountered: