Xref: utzoo gnu.g++:65 gnu.g++.bug:250 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!clipper.cis.ohio-state.edu!hall From: hall@clipper.cis.ohio-state.edu (john hall) Newsgroups: gnu.g++,gnu.g++.bug Subject: Help! Bug Message-ID: <35878@tut.cis.ohio-state.edu> Date: 18 Feb 89 00:44:32 GMT Sender: news@tut.cis.ohio-state.edu Reply-To: Followup-To: gnu.g++ Distribution: usa Organization: Ohio State University Computer and Information Science Lines: 39 Help! Compiler bug in g++ /* unknown revision */ The inclusion or exclusion of a simple printf statement has drastic consequences on program correctness /* ( DPR9 is just a print statement ) */ DPR9((" station %x\n", station)); DPR9((" display %x window %x\n", DISP, window)); DPR9((" display %x \n", DISP)); #if 1 DPR9((" black %x \n", station->black)); #endif new_gc = XCreateGC( station->mydisplay, window, 0, 0); DPR9((" display %x \n", DISP)); DPR9((" display %x window %x\n", DISP, window)); DPR9((" GC create\n")); exit(0); when #if 1, the program works: station efff9f8 display 25cc4 window 1 display 25cc4 black 1 display 25cc4 display 25cc4 window 1 GC create when #if 0, the program core dumps shortly after this code station efff9f8 display 25cc4 window 1 display 25cc4 display 0 display 0 window 74 GC create