Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hc!siegel From: siegel@hc.DSPO.GOV (Josh Siegel) Newsgroups: comp.bugs.4bsd Subject: Bug in Sun compiler... Message-ID: <11636@hc.DSPO.GOV> Date: Tue, 24-Nov-87 18:38:28 EST Article-I.D.: hc.11636 Posted: Tue Nov 24 18:38:28 1987 Date-Received: Sat, 28-Nov-87 05:28:21 EST Organization: Los Alamos National Laboratory Lines: 33 struct { int a,b,c; } main() {} The above program causes Suns compiler to generate code that has a Segmentation fault upon exiting. The reason being that Sun don't check to see if you specificly returned a structure. The register d0 is null and it offsets through it. _main: |#PROLOGUE# 0 link a6,#0 |#PROLOGUE# 1 movl d0,a0 movl #L14,a1 movl a0@+,a1@+ movl a0@+,a1@+ movl a0@+,a1@+ movl #L14,d0 unlk a6 rts Vax and GNU do this correctly... --Josh Siegel -- Josh Siegel (siegel@hc.dspo.gov) Friends don't let Friends eat Cherng ppn an a