2 /* { dg-options "-std=gnu99" } */
4 /* C99 6.5.2.2 Function calls.
5 Test structure passing and return values involving decimal floating
8 extern void abort (void);
17 } nums = { 1.0dl, 'a', 2.0dd, 'b', 3.0df };
20 d32_field (struct example s)
26 d64_field (struct example s)
32 d128_field (struct example s)
38 dummy1_field (struct example s)
44 dummy2_field (struct example s)
50 ptr_d32_field (struct example *s)
56 ptr_d64_field (struct example *s)
62 ptr_d128_field (struct example *s)
68 ptr_dummy1_field (struct example *s)
74 ptr_dummy2_field (struct example *s)
83 if (d32_field (nums) != 3.0df) abort ();
84 if (d64_field (nums) != 2.0dd) abort ();
85 if (d128_field (nums) != 1.0dl) abort ();
86 if (dummy1_field (nums) != 'a') abort ();
87 if (dummy2_field (nums) != 'b') abort ();
89 if (ptr_d32_field (&nums) != 3.0df) abort ();
90 if (ptr_d64_field (&nums) != 2.0dd) abort ();
91 if (ptr_d128_field (&nums) != 1.0dl) abort ();
92 if (ptr_dummy1_field (&nums) != 'a') abort ();
93 if (ptr_dummy2_field (&nums) != 'b') abort ();