gcc/testsuite/gcc.c-torture/execute/divconst-1.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | typedef struct |
| 5 | { |
| 6 | unsigned a, b, c, d; |
| 7 | } t1; |
| 8 | |
| 9 | void |
| 10 | f (t1 *ps) |
| 11 | { |
| 12 | ps->a = 10000; |
| 13 | ps->b = ps->a / 3; |
| 14 | ps->c = 10000; |
| 15 | ps->d = ps->c / 3; |
| 16 | } |
| 17 | |
| 18 | int |
| 19 | main (void) |
| 20 | { |
| 21 | t1 s; |
| 22 | f (&s); |
| 23 | if (s.a != 10000 || s.b != 3333 || s.c != 10000 || s.d != 3333) |
| 24 | abort (); |
| 25 | exit (0); |
| 26 | } |