🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #112

structure-returning functions on HP9000/300 series HP/UX

#112
From: Piet van Oostrum
Date: Tue, 20 Jun 1989 14:53
17 lines
1163 bytes
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)
Technical Details
Message-ID: <1392@ruuinf.cs.ruu.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!ruuinf!piet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!ruuinf!piet
From: piet@cs.ruu.nl (Piet van Oostrum)
Newsgroups: gnu.gcc.bug
Subject: structure-returning functions on HP9000/300 series HP/UX
Message-ID: <1392@ruuinf.cs.ruu.nl>
Date: 20 Jun 89 14:53:21 GMT
Sender: piet@ruuinf.cs.ruu.nl
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Organization: Dept of Computer Science, University of Utrecht, Holland
Lines: 17