What if Jupiter or the Sun was made of rock, like Earth and Mars, rather than gas? Jupiter is a "gas giant". If it was (significantly) bigger the pressure from gravitation would ignite a fusion process and it would become a star, which is basically what happened to the sun.
However, what if a body the size of Jupiter or the Sun was made of rocks like Earth and Mars are - what would happen then? Somewhere around iron (lead?) fusion can no longer take place and there is plenty of heavier-than-iron material on Earth.
Or is there something that would prevent such a large body of rocks to form?
 A: As far as I understand, rocky planets can only grow up to a certain size. This has to do with planetary formation period. A planet cannot grow indefinitely. It can grow only as long as there are particles around the star that can contribute to its increase of mass. During the formation period, dust particles collide and coalesce to form chunks, which further grow in size by gathering more dust particles or by combining with other chunks. This can go on only as long as there are supply from the dust disk surrounding the star. Eventually this gets depleted and planet can no longer grow much. Also note that the rocky planets are usually found to be closer to the star. Due to this, the amount of material available to form the planet is relatively smaller than the gas giants. The gas giants being formed at the outer regions, have larger circumference and thus more material gets fed into it. This cannot be the case with inner rocky planets.
A: I hope it is ok to link to other stackexchange communities, as there is an excellent answer to be found in the worldbuilding community: Is there a theoretical maximum size for rocky planets. The consensus seems to be that the maximum size for Earth-like planets is at around twice the radius of Earth.
A: The universe is roughly 98% hydrogen and helium (by mass), so it's very unlikely for a large body to form without it retaining a lot of those gases. (See Wikipedia for a table of the abundances of the ten most common elements in the Milky Way). In the modern universe, the molecular clouds that give birth to stars are enriched with heavier elements, but they are still primarily hydrogen and helium.
So while we know a lot about the various nuclear fusion processes that occur in stars, there's not a lot of info about fusion commencing in large rocky bodies composed primarily of heavier elements, simply because it's impossible for such a large body to avoid accumulating a lot of hydrogen & helium as it forms.
However, fusion does happen in some situations where there isn't much hydrogen. When large stars have fused most of the hydrogen in their cores, they start fusing heavier elements. These reactions require much higher temperatures than hydrogen fusion.

The main proton-proton chain which powers the Sun starts at around 4 MK (megakelvin). The triple alpha process, which fuses helium into carbon, needs 100 MK. The various carbon fusion processes require 500 MK and core density above 3 billion kg/m³, such conditions normally only occur in older stars heavier than 8 solar masses.
The final stages of stellar core fusion, the silicon-burning ladder, occur in massive stars with a minimum of about 8-11 solar masses. They require 2.7-3.5 billion kelvin (GK). The exact temperature depends on mass. At these temperatures, the ambient thermal radiation is so energetic (in the hard x-ray / gamma region of the spectrum) that it can disrupt nuclei, producing free protons, neutrons, and alpha particles, i.e., helium nuclei, and those helium nuclei can then participate in the silicon fusion ladder. At that stage, there isn't much primordial helium, or helium produced by fusion, left in the core.
However, the silicon burning processes only run for a few days. When a star has completed the silicon-burning phase, no further fusion is possible. The star catastrophically collapses and it may explode in a Type II supernova, leaving a neutron star or black hole remnant.
Carbon fusion can also occur when a white dwarf accretes mass from a companion, but that process also tends to be rather violent, leading to a Type Ia supernova. Such supernovae can occur when two white dwarfs collide, creating a much more energetic Type Ia supernova than usual.

While it's theoretically possible for a large carbonaceous or rocky body to undergo fusion, it's not possible for such a body to form naturally, except as the core of a star. But let's say you did somehow manage to get a huge mass of rocky material together without also gathering a lot of hydrogen. You'd need roughly a solar mass for it to reach the temperature and density necessary for fusion (so more than 50 times the heavy element content of our solar system). And then it'd blow itself up in a week or so. I think it might be difficult to raise funding for such a project. ;)
