Path: utzoo!mnetor!uunet!husc6!uwvax!umn-d-ub!umn-cs!hall!pmk From: pmk@hall.cray.com (Peter Klausler) Newsgroups: comp.arch Subject: WARNING: Two bugs in Dhrystone 2.0 Message-ID: <4735@hall.cray.com> Date: 8 Mar 88 21:09:55 GMT Organization: Cray Research, Inc., Mendota Heights, MN Lines: 30 Keywords: oops 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."