1 /* { dg-do compile { target { riscv64*-*-* } } } */
2 /* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
3 int a, b, e;
4 struct c *d;
5 struct c
6 {
7   int bins;
8   int binmap[10];
9 }
f(void)10 f(void)
11 {
12   for (;;)
13     {
14       e = (unsigned) a >> 3;
15       b = (long) &d[e];
16       if (b)
17 	d->binmap[0] = e;
18     }
19 }
20 /* { dg-final { scan-assembler-times "sext.w" 0 } } */
21