Fix UB
authorEddie Hung <eddie@fpgeh.com>
Wed, 11 Sep 2019 21:17:45 +0000 (14:17 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 11 Sep 2019 21:18:02 +0000 (14:18 -0700)
passes/pmgen/peepopt_dffmux.pmg

index 60a708616243a8a857c0c57f02e0d7930947ff01..fbabf90f0cb8813801402189e9dbfbdfcd3124eb 100644 (file)
@@ -35,8 +35,8 @@ match cemux
 endmatch
 
 code
-       SigSpec &D = cemux->connections_.at(cemuxAB == \A ? \B : \A);
-       SigSpec &Q = dff->connections_.at(\Q);
+       SigSpec D = port(cemux, cemuxAB == \A ? \B : \A);
+       SigSpec Q = port(dff, \Q);
        Const rst;
        if (rstmux)
                rst = port(rstmux, rstmuxBA).as_const();