Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!ccncsu!wendt@.cs.colostate.edu From: wendt@.cs.colostate.edu (Alan W) Newsgroups: comp.unix.xenix.sco Subject: 2.3.2 compiler bug Message-ID: <15055@ccncsu.ColoState.EDU> Date: 21 May 91 05:28:11 GMT Sender: news@ccncsu.ColoState.EDU Organization: Colorado State Computer Science Department Lines: 27 System: Xenix 2.3.2 for 286. Problem: >>= operator rapes stack, dumps core with -M2l. Reproduce by: compiling the following with -M2l and observing a core dump. main() { static long x; int i; for (i = 0; i < 20000; i++) x >>= 8; write(1, "done!\n", 6); } Fix: Verify that your compiler exhibits the problem. Extract the routine __blshr from /lib/Llibc.a. Use adb -w to change the "reti 6" at its end to a "reti 4". Verify that you have fixed the problem by recompiling the test with the .o file on the command line. Reinstall the .o file into the /lib/Llibc.a archive. Alan Wendt