  Context. The study of the galaxy stellar mass function (SMF) in relation to
the galaxy environment and the stellar mass density profile, rho(r), is a
powerful tool to constrain models of galaxy evolution. Aims. We determine the
SMF of the z=0.44 cluster of galaxies MACS J1206.2-0847 separately for passive
and star-forming (SF) galaxies, in different regions of the cluster, from the
center out to approximately 2 virial radii. We also determine rho(r) to compare
it to the number density and total mass density profiles. Methods. We use the
dataset from the CLASH-VLT survey. Stellar masses are obtained by SED fitting
on 5-band photometric data obtained at the Subaru telescope. We identify 1363
cluster members down to a stellar mass of 10^9.5 Msolar. Results. The whole
cluster SMF is well fitted by a double Schechter function. The SMFs of cluster
SF and passive galaxies are statistically different. The SMF of the SF cluster
galaxies does not depend on the environment. The SMF of the passive population
has a significantly smaller slope (in absolute value) in the innermost (<0.50
Mpc), highest density cluster region, than in more external, lower density
regions. The number ratio of giant/subgiant galaxies is maximum in this
innermost region and minimum in the adjacent region, but then gently increases
again toward the cluster outskirts. This is also reflected in a decreasing
radial trend of the average stellar mass per cluster galaxy. On the other hand,
the stellar mass fraction, i.e., the ratio of stellar to total cluster mass,
does not show any significant radial trend. Conclusions. Our results appear
consistent with a scenario in which SF galaxies evolve into passive galaxies
due to density-dependent environmental processes, and eventually get destroyed
very near the cluster center to become part of a diffuse intracluster medium.
