Path: chuka.playstation.co.uk!news From: Chris Chadwick Newsgroups: scee.yaroze.programming.gnu_compiler Subject: stack fault... still! Date: Fri, 24 Jul 1998 00:23:46 -0700 Organization: PlayStation Net Yaroze (SCEE) Lines: 30 Message-ID: <35B83682.2391@dial.pipex.com> NNTP-Posting-Host: userb122.uk.uudial.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I; 16bit) Hi OK, I still can't get a particular module in my project to compile with -O2 optimization. It compiles fine with -O0 and -O1 but I want it to run as fast as possible because it contains functions that are called MANY times during the main game loop. Heres the exact error message I get... gcc -O2 -c icsal.c Stack Fault at eip=d5d17 eax=00000098 ebx=000042ec ecx=0000001c edx=000012e0 esi=002cdab8 edi=00000001 ebp=001796e8 esp=0011204c cs=177 ds=16f es=16f fs=16f gs=187 ss=17f cr2=00009fec Call frame traceback EIPs: 0x000d5d17 0x00026fd8 0x000167fb 0x000076a5 0x00025ee0 0x000283d7 make.exe: *** [icsal.o] Error 1 I've tried using the suggested remedy of putting 'unsigned _stklen = 1048576' into the code to enlarge the stack but it made no difference! Help! Anyone got any ideas what's happening and how I can cure it? Thanks in advance, -Chris