For S Corps, pension/SEP/SIMPLE contributions are based on W-2 wages only. The net income/loss matters not.