The error I get when trying to run the program is:
Yosys failed with code 1 unnamed.sv:5: ERROR: Module port `\D0' is neither input nor output.
This happens for all the wires.
module twobitmulti (A1, A0, B1,B0, P0, P1, P2, P3, C1, D0, D1, D2);
input A1, A0;
input B1, B0;
output P0, P1, P2, P3;
wire D0,D1,D2, C1;
assign D0 =A1&&B0;
assign D1 =A0&&B1;
assign D2 =A1&&B1;
assign C1 =D0&&D1;
assign P0 =A0&&B0;
assign P1 =D0^^D1;
assign P2 =C1^^D1;
assign P3 =C1^^D2;
endmodule