This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[egcs-19980531] Optimization bug persists


Egcs continues to have this optimization bug. It appears in both places
I've tried, Linux and Solaris. The following code should print "OK".
When compiled with -O2 or better, it prints nothing.

int main(int c, char **v)
{
	extern int printf(char *, ...);
	int i;
	for (i = 1; i < 100; i++)
		;
	if  (i == 100) 
		printf("OK\n");
	return 0;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]