Witness Hugh Jones, 44, was being questioned about time he spent "on protection" in Barlinnie Prison, Glasgow, at the same time as killer Gavin McGuire.
Defence QC Donald Findlay asked Mr Jones if he could recall the man and Mr Jones replied: "Why would I?"
The lawyer continued: "One of Scotland's more notorious murderers, Gavin McGuire, one could say with confidence."
Mr Jones said: "No, I do not recall who you are talking about."
Mr Findlay said a conversation between Mr Jones and Mr McGuire - "who committed one of the most brutal murders in recent years in Scotland" - turned to the question of why the two men were in prison.
He suggested to Mr Jones: "You brought up Elaine Doyle's name in this conversation with this man Gavin McGuire and when you brought up Elaine Doyle's name, Mr McGuire, who had been speaking to you, clammed up and said nothing more and you thought that was, to say the least of it, odd."
Mr Jones replied: "How do you know what I think?"
John Docherty, 49, now of Dunoon, who is on trial for the murder of 16-year-old Elaine, has put forward a list of 41 possible suspects which, he claims, may include the real killer. Gavin McGuire and Hugh Jones are on the list.
When Mr Jones was asked if he had killed Ms Doyle, he told the trial: "No, don't be so daft."
The trial also heard Mr Jones claimed to have been at home before 10pm on June 1, 1986 - the night before Ms Doyle's naked body was found, just yards from her Greenock home.
But two schoolgirls told police in the days after the murder Mr Jones had told them he and other boys had spoken to Ms Doyle in Greenock town centre much later.
The trial continues.