delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/11/23:09:53

From: T DOT Harte AT btinternet DOT com (Thomas Harte)
Newsgroups: comp.os.msdos.djgpp
Subject: Weird Optimisation thingies to do with Allegro in this case
Date: Sat, 07 Jun 1997 14:39:24 GMT
Organization: BT Internet
Lines: 45
Message-ID: <33997160.469197@news.btinternet.com>
NNTP-Posting-Host: host5-99-52-243.btinternet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

	I have a nearly finished game, which compiles and runs fine
normally. However, if I compile with -O1, -O2 or -O3 (haven't tried
any others) I get screens of number such as :-

Shutting down Allegro
Exiting due to signal SIGSEGV
General Protection Fault at eip=000022d8
eax=00162060 ebx=00103004 ecx=fffffff3 edx=00000fa0 esi=00070a54
edi=00071ab4
ebp=00072504 esp=00070a0c program=C:\DJGPP\PROGS\MISSILE\MISSILE.EXE
cs: sel=00a7  base=82855000  limit=00111fff
ds: sel=00af  base=82855000  limit=00111fff
es: sel=00af  base=82855000  limit=00111fff
fs: sel=0087  base=00010500  limit=0000ffff
gs: sel=00bf  base=00000000  limit=ffffffff
ss: sel=00af  base=82855000  limit=00111fff

Call frame traceback EIPs:
  0x000022d8
  0x0000188f
  0x0001adb2

	And all the traceback thingies lead to is obviously not bugged
lines such as :-

temp[0]=scrmap[0].x;

	where those variables are declared as :-

int temp[4];
V3d_f scrmap[100];

	. . . can anyone tell me the error? Is it that I am storing a
floating point number in an integer? Usually this just rounds it off,
however I don't know where I know this should work from, so it may be
something I'm not supposed ot do.

	Can anyone help (e-mail answers as readily accepted as
newsgroup ones)? Thanks in advance,

		-Thomas


Ps the source code will go public domain once I'm finished, so it
would be nice if it worked!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019