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);
10 };
shift_left(int delta,int ct)11 inline void S1::shift_left(int delta, int ct)
12 {
13 int cnt = ct;
14 for (S1 *to_p = this, *from_p = to_p + delta; cnt--;) *to_p++ = *from_p++;
15 }
16
dispose_t(S1 * tp,int from_index,int ct,const int d_last_t)17 void dispose_t(S1 *tp, int from_index, int ct, const int d_last_t)
18 {
19 int new_ct = d_last_t + 1 - ct;
20 tp[0].o.p1[from_index].shift_left(ct, new_ct - from_index);
21 }
22