question of inline assembly

I'm on Solaris 10 x86 on an AMD64 system.

The following code:

== 1.c ==

int main()

{

int i;

for(i=0;i<5;++i)

__asm ("pause");

}

cannot pass -fast compiler option. Actually, it cannot pass optimization level > 2, i.e., it passes -O2, but cannot pass -O3/4/5.

$ cc -fast -o 1 1.c

"1.c", [main]:ube: error: SIGNAL: Segmentation Fault

cc: ube failed for 1.c

$ cc -O3 -o 1 1.c

"1.c", [main]:ube: error: SIGNAL: Segmentation Fault

cc: ube failed for 1.c

$ cc -O2 -o 1 1.c

$

For a workaround, I can put it in an .il file, then cc successfully compiles and links.

It's a new problem in Sun Studio 12. Version 11 doesn't have this problem. I don't have a SPARC, so I don't know if this problem exists on SPARC edition.

[840 byte] By [netexa] at [2007-11-27 10:34:21]
# 1

It's a known problem. See bug 6573195. It should be fixed in the coming patch.

dmikha at 2007-7-28 18:28:18 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

I saw the bug evaluation text:

===

The next available nightly build (053007) "after" Mars release seems to fix the problem.

Posted Date : 2007-07-05 18:12:44.0

===

where can I get this build? The download is still SunStudio12-solaris-x86-200705-pkg.tar.bz2.

netexa at 2007-7-28 18:28:18 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

It isn't released yet. As I know the first patch should be available in a few weeks.

dmikha at 2007-7-28 18:28:18 > top of Java-index,Development Tools,Solaris and Linux Development Tools...