p4c: Compiler bug: NULL name when writting standard_metadata_t fields from control block instance
When writing a standard_metadata_t field in a control block that is used by the main Ingress/Egress control I get a NULL name error for that field. For instance, the attached program will raise the following:
In file: .../_deps/p4c-src/backends/bmv2/common/expression.cpp:318
Compiler Bug: _deps/p4c-build/p4include/v1model.p4(102): NULL name: mcast_grp
bit<16> mcast_grp;
^^^^^^^^^
Both direct type invocation and explicit instantiation of the control will raise that error. I’ve tested this on:
- v1.2.3.0 - 1576090, deb package on Ubuntu 20.04, and
- v1.2.4.0 - f3667ee19, built from src on macos 12.6 null_field_standard_metadata.txt
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 17 (10 by maintainers)
Here are some examples that I have successfully used to get
--top4option to work. I think it might require the--dump <directory_name>option to also be given: