-
Notifications
You must be signed in to change notification settings - Fork 444
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: Kyle Cripps <[email protected]>
- Loading branch information
Showing
12 changed files
with
299 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,35 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
|
||
control C() { | ||
action bar(bool a, bool b) { | ||
bit<28> x; bit<28> y; | ||
if (a) { | ||
if (b) { | ||
__e(x); | ||
} | ||
} else { | ||
if (b) { | ||
__e2(y); | ||
} | ||
} | ||
} | ||
|
||
action foo() { | ||
bar(true, false); | ||
} | ||
|
||
table t { | ||
actions = { foo; } | ||
default_action = foo; | ||
} | ||
|
||
apply { | ||
t.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
|
||
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,40 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
|
||
control C() { | ||
action bar(bool a, bool b) { | ||
bit<28> x; bit<28> y; | ||
if (a) { | ||
if (b) { | ||
__e(x); | ||
} | ||
} else { | ||
if (b) { | ||
__e2(y); | ||
} | ||
} | ||
} | ||
|
||
action baz() { | ||
bar(true, false); | ||
} | ||
|
||
action foo() { | ||
baz(); | ||
baz(); | ||
} | ||
|
||
table t { | ||
actions = { foo; } | ||
default_action = foo; | ||
} | ||
|
||
apply { | ||
t.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
|
||
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,31 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
action bar(bool a, bool b) { | ||
bit<28> x; | ||
bit<28> y; | ||
if (a) { | ||
if (b) { | ||
__e(x); | ||
} | ||
} else if (b) { | ||
__e2(y); | ||
} | ||
} | ||
action foo() { | ||
bar(true, false); | ||
} | ||
table t { | ||
actions = { | ||
foo(); | ||
} | ||
default_action = foo(); | ||
} | ||
apply { | ||
t.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,19 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
@name("C.foo") action foo() { | ||
} | ||
@name("C.t") table t_0 { | ||
actions = { | ||
foo(); | ||
} | ||
default_action = foo(); | ||
} | ||
apply { | ||
t_0.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,19 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
@name("C.foo") action foo() { | ||
} | ||
@name("C.t") table t_0 { | ||
actions = { | ||
foo(); | ||
} | ||
default_action = foo(); | ||
} | ||
apply { | ||
t_0.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
action bar(bool a, bool b) { | ||
bit<28> x; | ||
bit<28> y; | ||
if (a) { | ||
if (b) { | ||
__e(x); | ||
} | ||
} else { | ||
if (b) { | ||
__e2(y); | ||
} | ||
} | ||
} | ||
action foo() { | ||
bar(true, false); | ||
} | ||
table t { | ||
actions = { | ||
foo; | ||
} | ||
default_action = foo; | ||
} | ||
apply { | ||
t.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,6 @@ | ||
issue4507_1.p4(9): [--Wwarn=uninitialized_use] warning: x may be uninitialized | ||
__e(x); | ||
^ | ||
issue4507_1.p4(13): [--Wwarn=uninitialized_use] warning: y may be uninitialized | ||
__e2(y); | ||
^ |
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,35 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
action bar(bool a, bool b) { | ||
bit<28> x; | ||
bit<28> y; | ||
if (a) { | ||
if (b) { | ||
__e(x); | ||
} | ||
} else if (b) { | ||
__e2(y); | ||
} | ||
} | ||
action baz() { | ||
bar(true, false); | ||
} | ||
action foo() { | ||
baz(); | ||
baz(); | ||
} | ||
table t { | ||
actions = { | ||
foo(); | ||
} | ||
default_action = foo(); | ||
} | ||
apply { | ||
t.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,19 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
@name("C.foo") action foo() { | ||
} | ||
@name("C.t") table t_0 { | ||
actions = { | ||
foo(); | ||
} | ||
default_action = foo(); | ||
} | ||
apply { | ||
t_0.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,19 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
@name("C.foo") action foo() { | ||
} | ||
@name("C.t") table t_0 { | ||
actions = { | ||
foo(); | ||
} | ||
default_action = foo(); | ||
} | ||
apply { | ||
t_0.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,37 @@ | ||
extern void __e(in bit<28> arg); | ||
extern void __e2(in bit<28> arg); | ||
control C() { | ||
action bar(bool a, bool b) { | ||
bit<28> x; | ||
bit<28> y; | ||
if (a) { | ||
if (b) { | ||
__e(x); | ||
} | ||
} else { | ||
if (b) { | ||
__e2(y); | ||
} | ||
} | ||
} | ||
action baz() { | ||
bar(true, false); | ||
} | ||
action foo() { | ||
baz(); | ||
baz(); | ||
} | ||
table t { | ||
actions = { | ||
foo; | ||
} | ||
default_action = foo; | ||
} | ||
apply { | ||
t.apply(); | ||
} | ||
} | ||
|
||
control proto(); | ||
package top(proto p); | ||
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,6 @@ | ||
issue4507_2.p4(9): [--Wwarn=uninitialized_use] warning: x may be uninitialized | ||
__e(x); | ||
^ | ||
issue4507_2.p4(13): [--Wwarn=uninitialized_use] warning: y may be uninitialized | ||
__e2(y); | ||
^ |