Verilog Implementation error DFFs and Gates
From the diagram, z is driven by a combinational logic. In the code, you are trying to drive z using sequential logic inside clockedge. You have to either use z as a wire and drive it using assign statement. Or use z as a reg and drive it inside always@* block. 

General coding guideline is to not mix blocking and non-blocking assignments in the same always block.