Take from the downward vertical. Under the conventional light-rod idealization, only the endpoint point mass contributes appreciably. Its speed is , and its gravitational potential energy is . Therefore
An additive constant in the potential energy has no effect on the Euler-Lagrange equation.
Rod-mass qualification: “thin” and “uniform” do not imply negligible mass. If the uniform rod has a finite unspecified mass , its pivot moment of inertia is and its centre of mass lies from the pivot. For a pendulum with a uniform rod and an endpoint mass, the general answer is
This formula covers either convention without inventing a rod mass. A result involving only the specified uses unless an additional relation for is stated.