gcc/testsuite/gcc.target/avr/lra-cpymem_qi.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-Os" } */ |
| 3 | |
| 4 | #include <stdbool.h> |
| 5 | |
| 6 | struct A |
| 7 | { |
| 8 | unsigned int a; |
| 9 | unsigned char c1, c2; |
| 10 | bool b1 : 1; |
| 11 | }; |
| 12 | |
| 13 | void |
| 14 | foo (const struct A *x, int y) |
| 15 | { |
| 16 | int s = 0, i; |
| 17 | for (i = 0; i < y; ++i) |
| 18 | { |
| 19 | const struct A a = x[i]; |
| 20 | s += a.b1 ? 1 : 0; |
| 21 | } |
| 22 | if (s != 0) |
| 23 | __builtin_abort (); |
| 24 | } |
| 25 | |
| 26 | /* { dg-final { scan-assembler-not "movw\[^\n\r]*r26,r30" } } */ |