You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached program gives the following output with p4test and p4c-bm2-ss:
terminate called after throwing an instance of 'Util::CompilerBug'
what(): COMPILER BUG: ../midend/copyStructures.cpp:45
struct_copying_bug.p4(35): choose_entry(choices);: Unexpected operation when eliminating struct copying
my_meta.entry = choose_entry(choices);
Indeed, the bmv2 back-end does not handle properly functions that return structures.
But there is no such function in v1model.p4...
This program is not strictly a program that is supported by the p4test and p4c-bm2-ss compilers.
(p4test models the capabilities of p4c-bm2-ss quite closely).
This is a bug because we should not crash, we should just give a nice error message.
A separate question is whether we do need to handle such functions in these back-ends.
mihaibudiu
pushed a commit
to mihaibudiu/p4c-clone
that referenced
this issue
Apr 26, 2017
The attached program gives the following output with p4test and p4c-bm2-ss:
struct_copying_bug.p4.txt
The text was updated successfully, but these errors were encountered: