summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/struct-by-value-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/struct-by-value-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/struct-by-value-2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/struct-by-value-2.c b/gcc/testsuite/gcc.dg/struct-by-value-2.c
new file mode 100644
index 000000000..8d5d0bb01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/struct-by-value-2.c
@@ -0,0 +1,15 @@
+/* This testcase caused a sanity check to abort on SPARC64
+ because of a discrepancy between two functions involved
+ in the calculation of structure layout. */
+
+/* { dg-do compile } */
+
+struct S { float f1; int i1; int i2; float f2; };
+
+extern void foo(struct S);
+
+void bar(void)
+{
+ struct S s;
+ foo(s);
+}