-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vladimír Štill <[email protected]>
- Loading branch information
Showing
6 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
void test<T>(in T val) {} | ||
|
||
struct S2<T> { | ||
T x; | ||
T y; | ||
} | ||
|
||
struct S1<T1, T2> { | ||
T1 x; | ||
S2<T2> y; | ||
} | ||
|
||
control c(inout bit<8> a) { | ||
apply { | ||
test((S1<bit<4>, int<6>>){x = 0, y = (S2<int<6>>){x = 0, y = 0}}); | ||
} | ||
} | ||
|
||
control E(inout bit<8> t); | ||
package top(E e); | ||
|
||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
void test<T>(in T val) { | ||
} | ||
struct S2_0 { | ||
int<6> x; | ||
int<6> y; | ||
} | ||
|
||
struct S2<T> { | ||
T x; | ||
T y; | ||
} | ||
|
||
struct S1_0 { | ||
bit<4> x; | ||
S2_0 y; | ||
} | ||
|
||
struct S1<T1, T2> { | ||
T1 x; | ||
S2<T2> y; | ||
} | ||
|
||
void test_0(in S1_0 val) { | ||
} | ||
control c(inout bit<8> a) { | ||
apply { | ||
test_0((S1_0){x = 4w0,y = (S2_0){x = 6s0,y = 6s0}}); | ||
} | ||
} | ||
|
||
control E(inout bit<8> t); | ||
package top(E e); | ||
top(c()) main; |
28 changes: 28 additions & 0 deletions
28
testdata/p4_16_samples_outputs/type-spec-nested-frontend.p4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
struct S2_0 { | ||
int<6> x; | ||
int<6> y; | ||
} | ||
|
||
struct S2<T> { | ||
T x; | ||
T y; | ||
} | ||
|
||
struct S1_0 { | ||
bit<4> x; | ||
S2_0 y; | ||
} | ||
|
||
struct S1<T1, T2> { | ||
T1 x; | ||
S2<T2> y; | ||
} | ||
|
||
control c(inout bit<8> a) { | ||
apply { | ||
} | ||
} | ||
|
||
control E(inout bit<8> t); | ||
package top(E e); | ||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
struct S2_0 { | ||
int<6> x; | ||
int<6> y; | ||
} | ||
|
||
struct S2<T> { | ||
T x; | ||
T y; | ||
} | ||
|
||
struct S1_0 { | ||
bit<4> x; | ||
S2_0 y; | ||
} | ||
|
||
struct S1<T1, T2> { | ||
T1 x; | ||
S2<T2> y; | ||
} | ||
|
||
control c(inout bit<8> a) { | ||
apply { | ||
} | ||
} | ||
|
||
control E(inout bit<8> t); | ||
package top(E e); | ||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
void test<T>(in T val) { | ||
} | ||
struct S2<T> { | ||
T x; | ||
T y; | ||
} | ||
|
||
struct S1<T1, T2> { | ||
T1 x; | ||
S2<T2> y; | ||
} | ||
|
||
control c(inout bit<8> a) { | ||
apply { | ||
test((S1<bit<4>, int<6>>){x = 0,y = (S2<int<6>>){x = 0,y = 0}}); | ||
} | ||
} | ||
|
||
control E(inout bit<8> t); | ||
package top(E e); | ||
top(c()) main; |
Empty file.