Input pins in top module unconnected
I ran into a similar issue. My problem was that I had disconnected the sub-module outputs from the main module while debugging. When the optimizer sees that the outputs aren't connected, it assumes that the module is not needed so it removes it to save space. As a result, the inputs are left floating; this will cause the errors that you are seeing.

If you want to disconnect the module at some point, assign one of the module outputs to a dummy load (like a debugging LED) and you'll be fine.