two compile issues with Sun Studio 12 @ x86(_64 = amd64)
The following two issues are absent on Solaris 10 SPARC and all previous Sun Studio versions (8 to 11), but present on both amd64 Solaris 10 and Linux 2.6 versions:
1. mozilla.org's Spidermonkey "JavaScript" (ECMAscript) can't be compiled with it: in file jsinterp.c an endless loop is entered by the optimizer in level -xO1 and higher (!). With no optimization, linking is impossible (unresolved symbols from jsinterp.o), which hints to defunct output.
2. the optimizer (ube) is crashing in sources with a switch with many many case labels in optimization level -xO3 and higher with a segfault.
[616 byte] By [
s.urbata] at [2007-11-27 8:52:22]

# 1
1)concerning the mozilla jsinterp.c bug :
6567859 ube hangs compiling a javascript interpreter
was filed.
2)concerning the SF problem of switch with many many case labels:
Please send a test case and the compilation command that can reproduce
the bug. If there are many header files needed, better sent a .i file produced
by command like this, replaceing -c with -E:
<compiler> <compilation commands> -E -V <test_file_name>.<file_type>> <test_file_name>.i
.i file will contain all the needed header files, so no header files needed to be sent.
Please show the versions of compiler components, which will be shown by -V, espeically the version of ube component.
Thanks!
# 2
Hello,Also please provide- Reproducible steps including flags used, compilation command, etc.- Output error messagesThanks.Rose
# 3
I have trouble to seperate a reasonable (example) source out of our complex sources showing the second issue what I can already tell is, that the following special pragma has to do with it (while I'm now in doubt that the each 256 case labels per switch, two switches in an if else clause have to do with it):
#pragma opt 0 (func_name)
Own1 Own2 func_name(...)
{
...
}
The buggy versions I can tell you: they are
on Solaris 10 amd64:
/opt/SUNWspro/bin/cc -V
cc: Sun C 5.9 SunOS_i386 2007/05/03
/opt/SUNWspro/prod/bin/ube -V
ube: Sun Compiler Common 12 SunOS_i386 2007/05/03
on GNU/Linux:
cc -V
cc: Sun C 5.9 Linux_i386 2007/05/03
ube -V
ube: Sun Compiler Common 12 Linux_i386 2007/05/03
The only important compiler option in this regard seems to be the optimization level, but the situation is complex too, if others should be also involved. I will investigate further...