It's a bit hard to read, but I think your profile says you are running gcc-4.1.2 + the sparc64/2006.1 profile. In that profile we have in package.mask the entry
package.mask:>=sys-devel/gcc-4.0.0
which means that at this point, we do not believe gcc-4.x.x compilers are stable enough to run at all. (True, the 2007.0 profile uses it, but I am not sure of that status of 2007.0 for general use).

My guess is that you have hit a bug in gcc-4.1.2, especially if the failure is always the same. For confirmation, you might ask on the #gentoo-sparc freenode IRC channel, or wait for someone more up-to-date on the status of gcc-4.1.2 than I am to respond here, too.