The situation as I understand it is that banks have the right under common law for automatic set-off for current accounts only i.e. if you have two current accounts with the same banking group, they can be set-off against each other. They cannot off-set a credit balance in a deposit account against a debit balance in a current account or a loan account under common law. However, there is nothing to stop banks entering into a contract with customers that allows them to offset all accounts. It is unlikely that any small individual depositor has signed up to this. Therefore, it is unlikely that you will lose all your savings if you have a deposit and a mortgage with the same bank. The bank cannot turn around and offset a deposit account of say €20,000 and a loan account of say €100,000 and tell you that you are you not getting your savings back and you still owe them €80,000.
Here is the link to the article. Its the last one on set-off