siegel@hc.DSPO.GOV (Josh Siegel) (11/25/87)
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