Comments (3)
Yes, this is the same is issue #25. This is not very easy to fix.
from p4c.
This seems a little more subtle. The following program compiles without problem:
// p4lang/p4c#118
#include<core.p4>
#include<v1model.p4>
typedef standard_metadata_t std_m;
struct H { };
struct M { std_m smeta; };
parser ParserI(packet_in pk, out H hdr, inout M meta, inout std_m smeta) {
state start { transition accept; }
}
control VC(in H hdr, inout M meta) {
apply { }
}
control Main(inout H hdr, inout M meta, inout std_m smeta) {
// VC() vc;
apply {
// vc.apply(hdr, meta);
meta.smeta.drop = true;
}
}
control CC(inout H hdr, inout M meta) {
apply { }
}
control DeparserI(packet_out b, in H hdr) {
apply { }
}
V1Switch(ParserI(), VC(), Main(), Main(), CC(), DeparserI()) main;
The problem only pops up when adding the two lines that are commented out.
from p4c.
Closing this since it duplicates #25.
from p4c.
Related Issues (20)
- [P4Testgen] Build a Prototype which uses architecture templates
- [P4Testgen] Add a p4test-like target to testgen. HOT 7
- [P4Testgen] Coverage ignores empty actions HOT 5
- p4-ebpf permission denied: func 'map_initializer' doesn't have 1-th argument: invalid bpf_context HOT 5
- How to use p4lang to implement division operation in compile-time unknown value ? HOT 2
- MoveInitializers drops the srcInfo when moving to the top of a P4Control body
- Protobuf build errors with v1.2.4.7 HOT 5
- [P4Testgen] Revisit handling of varbit in P4Tools/P4Testgen
- Cannot use hvec_map for cstring keys HOT 3
- [P4Testgen] Validate options as early as possible
- [P4Testgen] The actions' coverage works weirdly if action is called from multiple tables HOT 4
- Port XDP tests from archived p4c-xdp repository
- Show a warning when a `@hidden` annotation is used on something where it is meaningless
- Clarify expected behavior of `--W*=diagnostic` option when `diagnostic` can be an error HOT 11
- Bug in p4c with some kinds of if statements inside of action bodies HOT 3
- `P4TEST_REPLACE` does not replace expected contents of `p4tc` test outputs HOT 4
- If and return/exit statements causing uninitialized_use warnings HOT 2
- hvec_map::insert has a non-standard behavior HOT 2
- P4C arm64/aarch64 support HOT 14
- Update the hash functions used in `hash.cpp` and `cstring.cpp` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p4c.