We perform accurate four-component calculations for heavy closed-shell diatomic molecules in the framework of relativistic density functional theory using local and gradient corrected density functional schemes. As examples we have chosen Cu-2, Ag-2, Au-2, Tl-2, Pb-2, Bi-2, and Pt-2. The potential energy curves show the quality, and the discrepancies of the density functionals unscreened from any approximation of the relativistic effects. (C) 2000 American Institute of Physics. [S0021-9606(00)31105-9].