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:

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Here are some examples that I have successfully used to get --top4 option to work. I think it might require the --dump <directory_name> option to also be given: