pmk@hall.cray.com (Peter Klausler) (03/09/88)
Just got Dhrystone 2.0 off the net and threw it at our compilers. I noticed two problems in the code that readers will want to correct before using the benchmark: 1) In the Pascal version, the value of PointerGlob^.EnumComp at the end of computation should be Ident3, which prints as 2; the program notes that this value 'should be 1'. The C version does print 2. Change the literal 1 in the code to "ord (Ident3)". 2) In the C version, Number_Of_Runs really shouldn't be declared with the REG macro; the ampersand (address-of) operator is applied to this variable at line 120, which is illegal in real C compilers for register variables. Simply remove the REG at line 83 in dhry_pack_1.c. The first problem can cause unnecessary panic on the part of your local Pascal compiler development people (well, I panicked, at least), while the latter prevents compilation of the benchmark by real C compilers. Performance results from the Cray Pascal and C compilers were about the same as with the previous version; wait for Rick's report for full details. I've sent a copy of this note to pcrat!rick, but thought that the rest of the world might want to know about this. Please don't harrass me if another posting on these bugs arrives at your site before this one does. - Peter Klausler @ Cray Research Compiler Development, Mendota Heights MN ...!{ihnp4!cray,sun!tundra}!hall!pmk "Just a two-bit programmer on a sixty-four-bit machine."
csg@pyramid.pyramid.com (Carl S. Gutekunst) (03/10/88)
In article <4735@hall.cray.com> pmk@hall.cray.com (Peter Klausler) writes: >....the ampersand (address-of) operator is applied to this variable at line >120, which is illegal in real C compilers for register variables. I beg to differ. *REAL* computers \do/ allow you to take the address of a register. It's the rest of 'em that got it wrong. :-) :-) :-) <csg>
rick@pcrat.UUCP (Rick Richardson) (03/10/88)
In article <4735@hall.cray.com> pmk@hall.cray.com (Peter Klausler) writes: >Just got Dhrystone 2.0 off the net and threw it at our compilers. >I noticed two problems in the code that readers will want to correct >before using the benchmark: Please, folks, do not start throwing around changes and patches to Dhrystone to the net. Yes, there were (are) some problems with it. Please wait for 'official' the changes to come from Reinhold or myself. Otherwise, there won't be just one version of the benchmark. As a case in point, the REG change that Peter suggests would change the apparent usage that Reinhold desired. The change I posted as soon as I received mail concerning this did not alter the intended usage. Where a change is needed, and I feel comfortable making the change in Reinhold's absence, I will post the change. However, it *IS* Reinhold's program, and many of the suggestions I will just have to pass on to him. He is on one of those company sponsored health trips that have become so popular lately. He'll be back in three weeks or so. Also, 45 results have come in so far. Thanks everyone. -- Rick Richardson, President, PC Research, Inc. (201) 542-3734 (voice, nights) OR (201) 834-1378 (voice, days) uunet!pcrat!rick (UUCP) rick%pcrat.uucp@uunet.uu.net (INTERNET)