Gravitation will create a stress distribution inside any body. For homogeneous and isotropic materials there is two locations to care about: maximum tensile stress and maximum compressive stress. This is because the behavior of most materials differ when subjected to tensile versus compressive loads. (Ductile materials can be torn apart under tensile load but not under pure compression load; brittle materials usually have a higher compressive strength than tensile strength.)
According to continuum mechanics, the stresses depend on the geometry, the density and the gravitational acceleration only. For a body at rest, conservation of momentum evaluates to
$$
\rho f_i + \frac{\partial \sigma_{ij}}{\partial x_j} = 0
$$
where $\rho$ is the material's density, the $f_i$ are the internal forces ($f_i=-g\delta_{i3}$ when the gravitation is $g$ and is acting against negative 3 direction) and the $\sigma_{ij}$ are the stresses. (I'm using Einstein summation convention, so take the sum over $j$ in the $\sigma$-term in the above equation.)
I've done a simple FEM calculations of your problem. Just to make sure, here is the geometry I calculated (dimensions in m):
Note the torus is not perfect, there is a small flat area at the bottom I had to introduce to retain the torus in the simulation (produced by cutting 1 m off the perfect torus). This introduces a small perturbation at the bottom, but you need a finite area to support the torus, otherwise stresses will become infinite at the bottom (see also below).
The maximum compressive stress is at the bottom (where the torus is touching ground) as already stated by the other answers. This is given by the minimum principle stress as shown in the next image:
The picture shows the surface distribution of the minimum principle stress. Note that I have cut the scale at -50 MPa. The maximum compressive stress is at the bottom, and the best way to calculate that is (as given by the other answers) to divide mass by area. (This is the reason you need a finite area to support the torus.)
If the support area is large, the maximum compressive stress may also be achieved at the inner diameter. This maximum compressive stress for the geometry shown is at 32 MPa.
The maximum tensile stress is at the lowest point of the inner cirle. This is given by the maximum principle stress as shown in the following picture:
For this geometry, the maximum tensile stress calculates to approx. 28 MPa. The density I used for the calculations is 2.41 g/cm³ (concrete). The gravitational acceleration is 9.81 m/s² in the simulation. The total mass of the object is 11.9e+9 kg (11.9 million metric tons), its volume 4.93e+6 m³.
For many materials, the compressive stresses at the bottom will most likely be the limiting design factor. However for extremely brittle materials, the tensile stresses may be the limit. E.g. when using concrete you will need to add steel to areas with tensile stresses.
Now this still does not really answer your questions, since you have asked for an arbitrary material. As the others have pointed out, the stresses scale with geometry and density, i.e. doubling the size or doubling the density doubles the maximum stress. Now you have anything you need to calculate the stresses. To evaluate the maximum size compare stresses to strengths.
PS: Before actually building, think about safety factors.
PPS: This stress distribution is also quite intuitive if you think a little about it.
EDIT: I updated the density just now – I had a slightly wrong number in mind.
Also, for ductile materials this is still not the whole answer, since you can allow the material to yield in some areas. The material will then plastically deform in those areas. This is fine, as long as the non-yielding structure can still carry all loads. This approach can be formalized. The associated term in German is 'plastische Stützzahl' which translates to 'plastic support number', but I don't know the correct English translation.
In summary, the yield limit of the material need not be the ultimate limit, depending on your material. But it certainly is a good first estimate.