summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.wendy/gnu3.c
blob: ba3ca12c0e4d3f726e7f2afd38484cb02141919b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * From ptsfa!ames!hc!siegel Tue Nov 24 15:38:28 1987
 * From: siegel@hc.DSPO.GOV (Josh Siegel)
 * Newsgroups: comp.bugs.4bsd
 * Subject: Bug in Sun compiler...
 * Message-ID: <11636@hc.DSPO.GOV>
 * Date: 24 Nov 87 23:38:28 GMT
 * Organization: Los Alamos National Laboratory
 * 
 * The 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.
 * 
 * Vax and GNU do this correctly...
 */

struct {
        int a,b,c;
        } 
bar()
{}

main()
{
	bar();
	printf("Test passed\n");
}