We present systematic total energy calculations for metals ͑Al, Fe, Ni, Cu, Rh, Pd, and Ag͒ and semiconductors ͑C, Si, Ge, GaAs, InSb, ZnSe, and CdTe͒, based on the all-electron full-potential ͑FP͒ Korringa-KohnRostoker Green's-function method, using density-functional theory. We show that the calculated lattice parameters and bulk moduli are in excellent agreement with calculated results obtained by other FP methods, in particular, the full-potential linear augmented-plane-wave method. We also investigate the difference between the local-spin-density approximation ͑LSDA͒ and the generalized-gradient approximation ͑GGA͒ of Perdew and Wang ͑PW91͒, and find that the GGA corrects the deficiencies of the LSDA for metals, i.e., the underestimation of equilibrium lattice parameters and the overestimation of bulk moduli. On the other hand, for semiconductors the GGA gives no significant improvement over the LSDA. We also discuss that a perturbative GGA treatment based on FP-LSDA spin densities gives very accurate total energies. Further, we demonstrate that the accuracy of structural properties obtained by FP-LSDA and FP-GGA calculations can also be achieved in the calculations with spherical potentials, provided that the full spin densities are calculated and all Coulomb and exchange integrals over the Wigner-Seitz cell, occurring in the double-counting contributions of the total energy, are correctly evaluated. ͓S0163-1829͑99͒15331-1͔