gcc/testsuite/gcc.c-torture/execute/961213-1.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | int |
| 5 | g (unsigned long long int *v, int n, unsigned int a[], int b) |
| 6 | { |
| 7 | int cnt; |
| 8 | *v = 0; |
| 9 | for (cnt = 0; cnt < n; ++cnt) |
| 10 | *v = *v * b + a[cnt]; |
| 11 | return n; |
| 12 | } |
| 13 | |
| 14 | int |
| 15 | main (void) |
| 16 | { |
| 17 | int res; |
| 18 | unsigned int ar[] = { 10, 11, 12, 13, 14 }; |
| 19 | unsigned long long int v; |
| 20 | |
| 21 | res = g (&v, sizeof(ar)/sizeof(ar[0]), ar, 16); |
| 22 | if (v != 0xabcdeUL) |
| 23 | abort (); |
| 24 | |
| 25 | exit (0); |
| 26 | } |