[gnu.gcc.bug] gcc-1.36.92 on SPARC running SunOS 4.0.3

grossman@SUNBURN.STANFORD.EDU (Stu Grossman) (01/15/90)

The following program demonstrates the problem that I mentioned earlier.
Upon closer inspection though, it seems that the problem may actually be
with struct passing, not struct returns as I had previously thought.
Compiling it with/without -fpcc-struct-return makes no difference.

#include <ndbm.h>
#include <sys/file.h>

main()
{
  DBM *db;
  datum data, key;

  db = dbm_open("/usr/lib/aliases", O_RDONLY, 0);

  key.dptr = "postmaster";
  key.dsize = sizeof("postmaster");

  data = dbm_fetch(db, key);

  printf("data=%s\n", data.dptr);
}