David Cameron was accused of using his attack on the tax affairs of comedian Jimmy Carr as a distraction from the G20 summit's failure to secure a route out of the economic crisis.

Labour leader Ed Miliband mocked the Prime Minister for choosing to speak out about the avoidance scheme used by Carr but refusing to condemn Take That star Gary Barlow who was also accused of using a complex scheme to avoid paying millions of pounds to HM Revenue and Customs.

The Prime Minister criticised the TV comic for his use of an avoidance scheme at the summit in Mexico last week.

In the Commons Mr Miliband said: "No wonder he was looking for something else to talk about during the summit.

"Of course he found it ... the tax affairs of Jimmy Carr. On Wednesday he couldn't have been clearer: Jimmy Carr was morally wrong.

"And on what he called the 'Gary Barlow situation' he said this, and I'm not making this up, I promise, he said this: 'as soon as I get in front of a computer I will have a look at it'.

"On Thursday, the now familiar sound of screeching tyres could be heard, the u-turn was well and truly under way.

"He said this: 'I'm not going to give a running commentary on different people's tax affairs, I don't think that would be right'."

"This is a Prime Minister who has come back from that summit with nothing for Britain, nothing to turn round the double dip recession, nothing to help Britain's families, nothing to ensure growth in the world economy," Mr Miliband said.

"We heard with Ken Livingstone that it is Labour politicians that are involved in tax avoidance and now we know a new rule: they will stand up for tax avoiders wherever they are."

Veteran Labour left-winger Dennis Skinner (Bolsover) challenged the Prime Minister to publish the tax details of his Cabinet, or "millionaire's row" as he calls the Government front bench.

"Now that the Prime Minister has had his Jimmy Carr moment, wouldn't it be a good idea to publish a list of all those using tax avoidance schemes, including those closer to home, those that inhabit millionaire's row?"

The Prime Minister said: "I was hoping for once you would stand up and applaud what I have said about tax avoidance and aggressive tax avoidance. I thought for once we might be on the same side."