Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / g++.old-deja / g++.law / mentor1.C
blob4011b16596037032ed7fe3f0f45f48d73f4a705c
1 // { dg-do assemble  }
2 // { dg-options "-O" }
3 // GROUPS passed mentor
4 struct Word {
5    struct S1 *p1;
6 };
7 struct S1 {
8    Word o;
9    void shift_left(int delta, int ct);
11 inline void S1::shift_left(int delta, int ct)
13    int cnt = ct;
14    for (S1 *to_p = this, *from_p = to_p + delta; cnt--;) *to_p++ = *from_p++;
17 void dispose_t(S1 *tp, int from_index, int ct, const int d_last_t)
19         int new_ct = d_last_t + 1 - ct;
20         tp[0].o.p1[from_index].shift_left(ct, new_ct - from_index);