Buggy -O2

Juan Pablo Soto jpsoto@tor.indra.es
Mon Mar 8 23:32:00 GMT 1999


Dear friends,
is this list the suitable site to report a bug???

we have detected a buggy code generated by egcs-1.1.1 (and egcs-1.0.3)
using g++ with
"-O2 -g". Following it is code from KDE project,
kdebase-1.1/kwm/client.C


493  for (i=0;i<6;i++){
494    buttons[i] = getNewButton( options.buttons[i]);
495    if (getDecoration() == KWM::normalDecoration ) {
496	if (!trans){
497	    if (buttons[i])
498		buttons[i]->show();
499	}
500	else { // transient windows,
501	    if ( i == 0 && buttons[i] == buttonMenu )
502		continue;
503	    if ( i == 3 && options.buttons[3] == CLOSE )
504		continue;
505	    buttons[i]->hide();
506	}
507    }
508    else {
509	if (buttons[i] ){
510	    buttons[i]->hide();
511	}
512    }
513  }


Lines 505 and 510 are confused by egcs. We detected the bug by means of
unexpected null reference at line 510.

We hope above buggy example can be useful to egcs developers.

Best Regards,

-- 
INDRA Sistemas (Attention: Juan Soto)
Crtra. Loeches, 9
Torrejon, 28850 Madrid, SPAIN
Ph: 34.91.3968431, Fx: 34.91.3968104


More information about the Gcc-bugs mailing list