2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr50751-7.c
blob9aa84b3e7949d63f331a926b5e8d08e6da6cd28c
1 /* Check that mov.b and mov.w displacement insns are generated.
2 If this is working properly, there should be no base address adjustments
3 outside the mov insns. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1" } */
6 /* { dg-final { scan-assembler-not "add|sub" } } */
8 typedef struct
10 char a;
11 char b;
12 char c;
13 char d;
15 short e;
16 short f;
18 int g;
19 int h;
20 } X;
22 void
23 testfunc_00 (X* x)
25 x->g = x->b | x->c;
26 x->h = x->e | x->f;
27 x->d = x->g;
28 x->f = x->h;
31 int testfunc_01 (X* x)
33 return x->b | x->e | x->g;