aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted/s.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/unsorted/s.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/s.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/s.c b/gcc/testsuite/gcc.c-torture/unsorted/s.c
new file mode 100644
index 00000000000..e0c84262208
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/unsorted/s.c
@@ -0,0 +1,24 @@
+struct foo
+{
+ int a, b, c, d;
+ double doubl;
+} s1, s2;
+
+struct foo
+structret (s1, i1, i2, s2)
+ struct foo s1, s2;
+ int i1, i2;
+{
+ if (i1 != i2)
+ {
+ if (i1 < i2)
+ return s1;
+ else
+ return s2;
+ }
+ s2.a = 11;
+ s2.b = 22;
+ s2.c = s1.c;
+ s2.d = s1.d;
+ return s2;
+}