gcc/testsuite/gcc.target/powerpc/pr110411-1.c
raw| 1 | /* PR target/110411 */ |
| 2 | /* { dg-options "-O2 -mdejagnu-cpu=power10 -mblock-ops-vector-pair" } */ |
| 3 | |
| 4 | /* Verify we do not ICE on the following. */ |
| 5 | |
| 6 | #include <string.h> |
| 7 | |
| 8 | struct s { |
| 9 | long a; |
| 10 | long b; |
| 11 | long c; |
| 12 | long d: 1; |
| 13 | }; |
| 14 | unsigned long ptr; |
| 15 | |
| 16 | void |
| 17 | bug (struct s *dst) |
| 18 | { |
| 19 | struct s *src = (struct s *)(ptr & ~0xFUL); |
| 20 | memcpy (dst, src, sizeof(struct s)); |
| 21 | } |