mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-07 11:51:38 +02:00
Check that when an error message for a enum or struct data type is generated it points to the location of the declaration of the type. Signed-off-by: Lars-Peter Clausen <[email protected]>
33 lines
476 B
Verilog
33 lines
476 B
Verilog
// Checks that the line and file information is correctly attached to a enum
|
|
// data type and will be used when printing an error message about the enum.
|
|
|
|
module test;
|
|
|
|
// Direct
|
|
enum logic {
|
|
A, B = A
|
|
} e1;
|
|
|
|
// Used in a struct
|
|
typedef enum logic {
|
|
C, D = C
|
|
} enum1_type;
|
|
|
|
// Used as a signal type
|
|
typedef enum logic {
|
|
E, F = E
|
|
} enum2_type;
|
|
|
|
// Unreferenced
|
|
typedef enum logic {
|
|
G, H = G
|
|
} enum3_type;
|
|
|
|
struct packed {
|
|
enum1_type e;
|
|
} s;
|
|
|
|
enum2_type e2;
|
|
|
|
endmodule
|