MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
546 stars 114 forks source link

-Wunused-but-set-net behavior for a wire connecting two inout ports together #983

Closed jrudess closed 1 week ago

jrudess commented 1 week ago

In the following example, if I comment out the wild-card port connection and replace it with a named connection, the warning goes away. Ideally, there wouldn't be a warning for this case since the wire's purpose is only to interconnect two different modules.

slangtest162.sv:10:10: warning: net 'a' is driven but its value is never used [-Wunused-but-set-net]
    wire a;
         ^
module m(
    inout wire a
);
    wire local_a;
    pullup(local_a);
    tranif1(a, local_a, 1'b1);
endmodule

module top;
    wire a;

    m m1(
       // .a (a)
       .*
    );

    m m2(
       // .a (a)
       .*
    );

endmodule
MikePopoloski commented 1 week ago

Fixed in 3e935730c8d2054e11f457fbe9b36a424a008d53