-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path2206.p4
65 lines (51 loc) · 1.85 KB
/
2206.p4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*Invoking preprocessor
cpp -C -undef -nostdinc -x assembler-with-cpp -Ip4_tv/p4c/build/p4include -D__TARGET_BMV2__ -Ip4_tv/p4c/build/p4include -Ip4_tv/p4c/build/p4include ./2206.p4i
ParseAnnotationBodies_0_ParseAnnotations
ParseAnnotationBodies_1_ClearTypeMap
FrontEnd_0_ParseAnnotationBodies
FrontEnd_1_PrettyPrint
FrontEnd_2_ValidateParsedProgram
FrontEnd_3_CreateBuiltins
FrontEnd_4_ResolveReferences
ConstantFolding_0_DoConstantFolding
FrontEnd_5_ConstantFolding
InstantiateDirectCalls_0_ResolveReferences
InstantiateDirectCalls_1_DoInstantiateCalls
FrontEnd_6_InstantiateDirectCalls
FrontEnd_7_ResolveReferences
Deprecated_0_ResolveReferences
Deprecated_1_CheckDeprecated
FrontEnd_8_Deprecated
FrontEnd_9_CheckNamedArgs
In file: p4_tv/p4c/frontends/p4/typeChecking/typeChecker.cpp:1966
[31mCompiler Bug[0m: p4_tv/p4c/frontends/p4/typeChecking/typeChecker.cpp:1966: Null cst
running cc -E -C -undef -nostdinc -x assembler-with-cpp -I p4_tv/p4c/build/p4include -o ./2206.p4i bugs/crash/fixed/2206.p4
running p4_tv/p4c/build/p4c-bm2-ss -I p4_tv/p4c/build/p4include --p4v=16 -vvv -o ./2206.json ./2206.p4i --arch v1model
*/
#include <core.p4>
#include <v1model.p4>
header H {
bit<8> a;
bit<8> b;
bit<8> c;
}
struct Headers {
H h;
}
struct Meta {
}
parser p(packet_in pkt, out Headers hdr, inout Meta m, inout standard_metadata_t sm) {
state start {
transition accept;
}
}
control ingress(inout Headers h, inout Meta m, inout standard_metadata_t sm) {
apply {
h.h.a = (1 << h.h.c) + 8w2;
}
}
control vrfy(inout Headers h, inout Meta m) { apply {} }
control update(inout Headers h, inout Meta m) { apply {} }
control egress(inout Headers h, inout Meta m, inout standard_metadata_t sm) { apply {} }
control deparser(packet_out b, in Headers h) { apply {} }
V1Switch(p(), vrfy(), ingress(), egress(), update(), deparser()) main;