summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.wendy/gnu3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.wendy/gnu3.c')
-rwxr-xr-xgcc/testsuite/gcc.wendy/gnu3.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.wendy/gnu3.c b/gcc/testsuite/gcc.wendy/gnu3.c
new file mode 100755
index 0000000..ba3ca12
--- /dev/null
+++ b/gcc/testsuite/gcc.wendy/gnu3.c
@@ -0,0 +1,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");
+}