Australian hall of fame swim coach Denis Cotterell has lashed out at people labeling Chinese Olympic champion Sun Yang a 'drug cheat' and pointed out Australia's checkered past in relation to positive drug tests.

The former coach of Australian Olympic champions Grant Hackett, Giaan Rooney, and Michael Klim recently signed a $1 million-a-year contract to lead China's 2020 Olympic campaign.

Cotterell, who previously trained Yang at the Queensland-based Miami Swimming Club before the Chinese swimmer's three-month drug ban in 2014, said people should not throw stones from 'glasshouses'.

Denis Cotterell lashed out at people labeling Chinese Olympic champion Sun Yang a 'drug cheat' and pointed out Australia's checkered past in relation to positive drug tests

Yang served a three-month doping ban in 2014 for taking the banned substance trimetazidine - a drug used for the treatment of chest pain.

The veteran swim coach took aim in particular at former Australian swimming poster girl Samantha Riley who failed a drug test in the lead up to the 1996 Atlanta Olympics.

Riley was later exonerated after her swim coach Scott Volkers admitted to giving her a pill for a headache that contained the banned substance dextropropoxyphene.

'I was there when Sam got busted. Did we call her a cheat for the rest of her life?' Cotterell told The Sunday Telegraph.

The veteran swim coach (right) previously trained Sun Yang (left) at the Queensland based Miami Swimming Club before his three month drug ban in 2014 (pictured 2012 Olympics)

The spotlight was intensified on Yang during the Rio Olympics after Australian 400m Olympic champion Mack Horton (centre) said he 'didn't have time or respect for drug cheats'

'I'm not saying it but by that same dialogue, by that same rationale, Sam Riley is a cheat too. But we didn't say that did we?

'If you want to play that way, I mean, I'm not going to say it, but does race have something to do with it? I don't know. But it's nice when you're in glass houses.'

The spotlight was intensified on Yang during the Rio Olympics after Australian 400m Olympic champion Mack Horton said he 'didn't have time or respect for drug cheats' after he beat his Chinese rival by the smallest of margins to claim the gold.

The feud with Yang reportedly stemmed after he tried to 'taunt' Horton in the Rio training pool by splashing water on him.

The feud with Yang reportedly stemmed after he tried to 'taunt' Horton in the Rio training pool by splashing water on him

Horton didn't shy away from his comments and later told reporters he had no regrets about calling out Yang

The 20-year-old gold medalist launched a surprise chip at the controversial world champion when asked about the training incident.

'It got played up a bit but he splashed me to say hi and I ignored him, I don't have time or respect for drug cheats,' Horton said.

Horton didn't shy away from his comments and later told reporters he had no regrets about calling out Yang.

'I don't think it is a big statement because it is true, he has tested positive,' he said.

Cottrell also said that his foreign athletes appear to 'want to be here' and 'train hard' which is what he enjoyed about coaching them.