[comp.unix.microport] 386 C post-optimizer goofs up news' ifuncs.c with -DDBM

karl@sugar.uu.net (Karl Lehenbauer) (11/01/88)

Bell Technologies System V/386 (probably applys to all AT&T-derived Sys V/386es)
News 11 patchlevel 14
Jon Zeeff's dbz.c news-specific dbm routines.

When compiling ifuncs.c with -DDBM selected, the optimizer screws up the
calls made to addhist() near the end of history().  Specifically, it seems
to mess up the address passed to addhist, passing the address of histline
instead of the argument.  When compiled without optimization, it works
OK.  A brief examination of the assembly output shows that the optimizer
in-lines the calls to addhist -- I haven't gone further.

The result is that it appears to make the dbz routines not work because
addhist not working causes store() to be given a string that doesn't match
the article ID, so fetch() won't find it later, hence rnews won't reject
duplicate articles.  Whew.
-- 
-- "We've been following your progress with considerable interest, not to say
-- contempt."  -- Zaphod Beeblebrox IV
-- uunet!sugar!karl, Unix BBS (713) 438-5018