[gnu.gcc.bug] structure-returning functions on HP9000/300 series HP/UX

piet@cs.ruu.nl (Piet van Oostrum) (06/20/89)

The HP/UX cc compiler returns structure values from functions in the
address pointed to by register a1, even for small structures. Gcc only does
this for structures > 8 bytes. So it is impossible to call dbm routines.

The following insertion in tm-hp9k320.h will correct this behaviour:


/* pass all struct returns via memory */

#define RETURN_IN_MEMORY(type)	\
	(TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE)

(This is for gcc version 1.35)
-- 
Piet van Oostrum, Dept of Computer Science, University of Utrecht
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)