I just compiled dovecot 1.0.2 (IMAP mail server) on a SunFire V20z (opteron) platform using Sun Studio Version 12. The result was that the imap process of dovecot ran (functioned) but sucked up all the cpu resources.
So I built a debug version of dovecot to track down the problem, but the debug version behaved properly. So, I played with compiler switches.
-fast includes several agresiive optimizations (such as -fsimple=2, or
-xalias_level=basic) which require the user code to follow some rules
or not to depend on the nuances of the semantics.
You can use -# (for cc) or -v (for CC) to check which options are incuded in -fast.