Sec 311cr.p.c. clearly says that at any stage of trial-
1.Court can summon any person as a witness;
2.Examine any person who is in attandance though not summoned;
3.recall and re-examine any person already examined .
Again in a very important decision in Mani v/s state ,1986 ,madras high court held that "where a person was essentially a witness for the prosecution and the prosecution should have cited him either in the chargesheet or immediately afterwards but failed to do so ,the failure of the prosecution to call him as the witness can not be made up by the court excercising it's power under this section.Although the court can examine a witness at the instance of the prosecution or defence ,still ,when the prosecution asks the court to examine him because it could not examine him though it had intended to do so,that should be no ground for the court to exercise its discretion under this section .