Unix Technical Forum

Bug in Sun compiler WS6U2? - Crashes during compile phase with -fast.

This is a discussion on Bug in Sun compiler WS6U2? - Crashes during compile phase with -fast. within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 213.78.42.15 Message-ID: <423e0c56@212.67.96.135> X-Trace: 20 Mar 2005 23:50:46 GMT, 213.78.42.15 Lines: 115 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 08:28 AM
David Kirkby
 
Posts: n/a
Default Bug in Sun compiler WS6U2? - Crashes during compile phase with -fast.

Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 213.78.42.15
Message-ID: <423e0c56@212.67.96.135>
X-Trace: 20 Mar 2005 23:50:46 GMT, 213.78.42.15
Lines: 115
Path: number1.nntp.dca.giganews.com!border1.nntp.dca.gig anews.com!nntp.giganews.com!novia!newscon06.news.p rodigy.com!newscon02.news.prodigy.com!prodigy.net! cyclone.swbell.net!cyclone-sf.pbi.net!216.218.192.242!news.he.net!chekhov.con xion.net!212.67.96.135!213.78.42.15
Xref: number1.nntp.dca.giganews.com comp.unix.solaris:474741 comp.sys.sun.admin:143847

I have a problem in that the Sun compiler (admittidly not the latest
version)

sparrow /export/home/drkirkby/Mlucas_src % cc -V
cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15

seems to exit with an "illegal instruction" when compiling a bit of code
with the -fast option. This is not the executable program produced by
the compiler that is crashing, but the compiler itself. I don't use the
Sun compiler much, but have had it installed a few years with no hassle
, but this bit of code seems to create problems.

It's not the latest version of the compiler, so but perhaps someone with
a later one would check it, since if there is a bug in the current code,
I guess Sun would want to know about it. Perhaps a 4-year old compiler
they will be less concerned about, although if there is a patch I would
not mind it.

Without the -fast option, the compiler works fine.

The source is for finding large prime numbers

http://www.mersenne.org/

which finds primes of the form

M = 2^p -1

where M is always prime if p is prime. Hence if you find a large p that
is prime, you can get find huge Mersenne Prime M.

The actual bit of source for finding primes I'm trying to compile is at:

ftp://hogranch.com/pub/mayer/src/C/M...0.21.04.tar.gz

It seems to be the file

/usr/local/stow/ForteDeveloper6Update2/SUNWspro/WS6U2/bin/cg

in my compiler setup that is exiting with an illegal instruction. (the
'cc' is linked to /usr/local/bin/cc).


System is Sun Ultra 80, 4 x 450 MHz, 4GB RAM, Solaris 9 8/03
s9s_u4wos_08a SPARC, Generic_117171-15.

Here's the output of the compilation stage.


sparrow /export/home/drkirkby/Mlucas_src % cc -o Mlucas -fast *.c -lm
cc: Warning: -xarch=native has been explicitly specified, or implicitly
specified by a macro option, -xarch=native on this architecture implies
-xarch=v8plusa which generates code that does not run on pre UltraSPARC
processors
Mlucas.c:
"Mlucas.c", line 1026: warning: statement not reached
^Csparrow /export/home/drkirkby/Mlucas_src % cc -o Mlucas -fast -lm *.c
cc: Warning: -xarch=native has been explicitly specified, or implicitly
specified by a macro option, -xarch=native on this architecture implies
-xarch=v8plusa which generates code that does not run on pre UltraSPARC
processors
Mlucas.c:
"Mlucas.c", line 1026: warning: statement not reached
br.c:
mers_mod_square.c:
qfloat.c:
radix10_ditN_cy_dif1.c:
radix11_ditN_cy_dif1.c:
radix12_ditN_cy_dif1.c:
radix13_ditN_cy_dif1.c:
radix14_ditN_cy_dif1.c:
radix15_ditN_cy_dif1.c:
radix16_dif_dit_pass.c:
radix16_ditN_cy_dif1.c:
radix16_wrapper_ini.c:
radix16_wrapper_square.c:
radix18_ditN_cy_dif1.c:
radix20_ditN_cy_dif1.c:
radix22_ditN_cy_dif1.c:
radix24_ditN_cy_dif1.c:
"radix24_ditN_cy_dif1.c", line 1351: warning: newline not last character
in file
radix26_ditN_cy_dif1.c:
radix28_ditN_cy_dif1.c:
radix30_ditN_cy_dif1.c:
radix32_dif_dit_pass.c:
radix32_ditN_cy_dif1.c:
radix32_wrapper_ini.c:
radix32_wrapper_square.c:
radix36_ditN_cy_dif1.c:
radix5_ditN_cy_dif1.c:
radix6_ditN_cy_dif1.c:
radix7_ditN_cy_dif1.c:
radix8_dif_dit_pass.c:
cc: Fatal error in
/usr/local/bin/../stow/ForteDeveloper6Update2/SUNWspro/bin/../WS6U2/bin/cg
: Illegal Instruction

sparrow /export/home/drkirkby/Mlucas_src % cc -V
cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
usage: cc [ options] files. Use 'cc -flags' for details
sparrow /export/home/drkirkby/Mlucas_src % which cc
/usr/local/bin/cc
sparrow /export/home/drkirkby/Mlucas_src % ls -l /usr/local/bin/cc
lrwxrwxrwx 1 root other 46 Mar 20 2003 /usr/local/bin/cc
-> ../stow/ForteDeveloper6Update2/SUNWspro/bin/cc
sparrow /export/home/drkirkby/Mlucas_src %

--
Dr. David Kirkby,
G8WRB

Please check out http://www.g8wrb.org/
of if you live in Essex http://www.southminster-branch-line.org.uk/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:23 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com