[cc65] Think i have triggered a bug with -Oirs

From: Markus Stehr <bastetfurry1ircnet.de>
Date: 2010-01-17 17:25:13
Hi List! :)

I think i have triggered a bug with the optimization rule -Oirs.
While rendering a pseudo-3d-dungeon view i get graphical glitches with
this option. If i remove it the glitches are gone. Strangely, i tryed to
catch the glitch with a bunch of cgetc(); from conio.h (Single-Stepping
trough the drawing process...) and its gone.

My Version:
bastetfurry@katzenrechner:~/projekte/lon.c64$ cc65 --version
cc65 V2.13.0
SVN version: unknown

I cant recreate this with a simple programm so i would need to send the
whole (small) project to someone who wants to look at it.
If someone can make some sense out of a snippet too, here is the snippet
that is causing the bug:

//	cgetc();
	if(mazeview[1][1]>0)
	{
		for(x=0;x<3;++x)
		{
			VIDEO_RAM[0x078+x] = 102;VIDEO_RAM[0x0a0+x] = 102;VIDEO_RAM[0x0c8+x]
= 102;
			VIDEO_RAM[0x0f0+x] = 102;VIDEO_RAM[0x118+x] = 102;VIDEO_RAM[0x140+x]
= 102;
		}

		VIDEO_RAM[0x07b] = 102;
//		VIDEO_RAM[0x0a3] = 102;VIDEO_RAM[0x0a4] = 102;
//		VIDEO_RAM[0x0cb] = 102;VIDEO_RAM[0x0cc] = 102;
//		VIDEO_RAM[0x0f3] = 102;VIDEO_RAM[0x0f4] = 102;
//		VIDEO_RAM[0x11b] = 102;VIDEO_RAM[0x11c] = 102;
//		VIDEO_RAM[0x143] = 102;
	}
//	cgetc();

If i compile it like this the glitch is there, if i enable the first
cgetc its gone. If i compile this without -Oirs its gone too.

Hope thats enough, if not, i am happy to send the bughunter the complete
source. ;)

Greets,
Markus

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jan 17 17:25:27 2010

This archive was generated by hypermail 2.1.8 : 2010-01-17 17:25:30 CET