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

p4c bmv2-v1model compiler bug when using typedef for standard_metadata_t #677

Closed
tomrodeheffer opened this issue May 27, 2017 · 2 comments
Closed
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@tomrodeheffer
Copy link

I got tired of writing standard_metadata_t on the parameter lists of the various v1model controls that need it. So I abbreviated by saying

typedef standard_metadata_t SM;

I expected this would be just fine, since section 7.3 in the 2017-05-22 P4_16 spec says "The two types are treated as synonyms, and all operations that can be executed using the original type can be also executed using the newly created type."

Here is my test file: smeta.p4.txt
p4c says:

In file: ../backends/bmv2/expression.cpp:239
Compiler Bug: ../backends/bmv2/expression.cpp:239: Null name
@hanw hanw self-assigned this May 28, 2017
@hanw
Copy link
Contributor

hanw commented May 28, 2017

This is a regression caused by recent refactoring. Will fix.

@mihaibudiu mihaibudiu added the bug This behavior is unintended and should be fixed. label May 30, 2017
mihaibudiu pushed a commit to mihaibudiu/p4c-clone that referenced this issue Sep 1, 2017
@mihaibudiu mihaibudiu added the fixed This topic is considered to be fixed. label Sep 1, 2017
mihaibudiu pushed a commit that referenced this issue Sep 12, 2017
* Fix for issue #677
@mihaibudiu
Copy link
Contributor

I think that this has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

No branches or pull requests

3 participants