Files
iverilog/ivtest/ivltests/enum_dims_invalid.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
By adding ivtest to the iverilog source tree, it is easier to keep
the regression test synchronized with the source that is being tested.
This should be especially helpful for PRs that add a new feature, and
have a matching ivtest PR with the regression test for that feature.
2022-01-15 10:18:50 -08:00

51 lines
494 B
Verilog

// Check that all sorts of enum dimension declarations are handled correctly and
// do not cause an assert or segfault.
module test;
// These are invalid
enum logic [$] {
A
} a;
enum logic [] {
B
} b;
enum logic [-1] {
C
} c;
enum logic [0] {
D
} d;
enum logic [1:0][3:0] {
E
} e;
// These are valid
enum logic [0:2] {
F
} f;
enum logic [2:0] {
G
} g;
enum logic [-1:-2] {
H
} h;
// These are valid as an extension in iverilog
enum logic [16] {
I
} i;
int x;
endmodule