gcc/testsuite/gcc.c-torture/compile/dm.c
raw| 1 | /* { dg-additional-options "-std=gnu89" } */ |
| 2 | |
| 3 | struct dm |
| 4 | { |
| 5 | unsigned q; |
| 6 | unsigned r; |
| 7 | }; |
| 8 | |
| 9 | struct dm |
| 10 | dm (a, b) |
| 11 | unsigned a, b; |
| 12 | { |
| 13 | struct dm qr; |
| 14 | |
| 15 | qr.q = a / b; |
| 16 | qr.r = a % b; |
| 17 | return qr; |
| 18 | } |
| 19 | |
| 20 | main () |
| 21 | { |
| 22 | struct dm qr; |
| 23 | |
| 24 | qr = dm (100, 30); |
| 25 | printf ("%u, %u\n", qr.q, qr.r); |
| 26 | } |