diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr21638.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr21638.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr21638.c b/gcc/testsuite/gcc.c-torture/compile/pr21638.c new file mode 100644 index 000000000..36fd0104a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr21638.c @@ -0,0 +1,21 @@ +typedef struct hashhdr { + int bitmaps[32]; +} HASHHDR; + +static void +swap_header_copy(HASHHDR *srcp, HASHHDR *destp) +{ + int i; + for (i = 0; i < 32; i++) + ((char *)&(destp->bitmaps[i]))[0] = ((char *)&(srcp->bitmaps[i]))[1]; +} + +int +flush_meta(HASHHDR *whdrp1) +{ + HASHHDR *whdrp; + HASHHDR whdr; + whdrp = &whdr; + swap_header_copy(whdrp1, whdrp); + return (0); +} |