If you contribute €10k in each case to the Pension, then your net cost is €6k after tax relief. It's the same in either example. Your pension tax saving is €4k. Your tax liability on the rental income is unchanged.Both cases below I'm assuming PAYE worker paying high rate of income tax.
Example 1
No rental income
Contribute 10k from savings to pension
Say high rate tax 40%
Actual contribution 10/.6 = 16.67k into pension
Example 2
Rental income
Next year I do the same but this time I have 6.67k in rental profit. What happens?
Declare 6.67k rental profit
Contribute 10k lump sum from savings as before
Revenue calculates I have tax relief of 6.67k and reduces tax bill.
Actual contribution will be: 10k into pension this time.
I think I saved paying tax but really no gain. Because now I have contributed less to my pension than previous year.