From mboxrd@z Thu Jan 1 00:00:00 1970 From: wkt@tuhs.org (Warren Toomey) Date: Mon, 5 May 2008 16:08:24 +1000 Subject: [Unix-jun72] C compiler status Message-ID: <20080505060824.GA78841@minnie.tuhs.org> Still no great progress. I can confirm that "cc" and "cvopt" both work, but the two compiler passes "c1" and "c2" don't work. Sometimes I can get them to core, but with different arguments the system locks up. On http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html, Dennis notes this: A second, less noticeable, but astonishing peculiarity is the space allocation: temporary storage is allocated that deliberately overwrites the beginning of the program, smashing its initialization code to save space. The two compilers differ in the details in how they cope with this. In the earlier one, the start is found by naming a function; in the later, the start is simply taken to be 0. This indicates that the first compiler was written before we had a machine with memory mapping, so the origin of the program was not at location 0, whereas by the time of the second, we had a PDP-11 that did provide mapping. (See the Unix History paper). In one of the files (prestruct-c/c10.c) the kludgery is especially evident. It could be that this sort of memory operation is what is causing the problem. Is there a way for simh to give an instruction trace beginning at a certain address e.g. 040000, so I can watch c0's behaviour and see where it goes off the rails? Thanks, Warren