Path: chuka.playstation.co.uk!news From: sceetech Newsgroups: scee.yaroze.programming.3d_graphics,scee.yaroze.programming.gnu_compiler,scee.yaroze.programming.codewarrior Subject: Re: Best Compiler bug ever (almost) Date: Thu, 10 Apr 1997 09:15:44 +0100 Organization: SCEE Lines: 35 Message-ID: <334CA1B0.426E@interactive.sony.com> References: <334c572f.9721328@news.playstation.co.uk> Reply-To: ps_yaroze@interactive.sony.com NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Xref: chuka.playstation.co.uk scee.yaroze.programming.3d_graphics:64 scee.yaroze.programming.gnu_compiler:14 scee.yaroze.programming.codewarrior:29 Alex Amsel wrote: > > We have come up against several compiler and ps-x bugs so far, > including gcc crashing on -O3 compiles [stack error] on simple code > and some other stuff, but this is brilliant! > > The following code kills the Yaroze. Something to do with the variable > name length (9) although longer and shorter seems ok. Only occurs with > certain sized arrays (something to do with odd values?) and with > unsigned shorts possibly. Anyway, mad mad mad bug. libps.h doesn't > need to be included. > > unsigned short PlayerMap[3*5]; > > main() > { > } > > * Alex Amsel * Into Beyond Web Design & JAVA Programming * > * http://www.intobeyond.com * WWFC Play off ****ers'97 * > MM: "Hand the opposition the lead, the supporters love it" Cool bug...(gnu fixes welcome) About your stack problems, There is a GNU environment variable that sets up the size of the STACK. Use the following to set it to 2M SET GO32=dpmistack 2000000 I wouldn't recommend going above 02, as the optimisations added for 03 are mainly related to loop unrolling, which gives no advantages on the Yaroze because of the direct mapped cache. ( Loop overheads on the R3000 are very low ) Colin.