This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/71083] [5/6/7 Regression] Unaligned bit-field address when predictive commoning
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 07 Aug 2016 12:10:18 +0000
- Subject: [Bug tree-optimization/71083] [5/6/7 Regression] Unaligned bit-field address when predictive commoning
- Auto-submitted: auto-generated
- References: <bug-71083-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71083
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernd.edlinger at hotmail dot de
--- Comment #6 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
just wanted to add that the patch in comment#2
does not fix this similar test case:
struct lock_chain {
char x;
unsigned short base;
} __attribute((packed));
struct lock_chain * foo (struct lock_chain *chain)
{
int i;
for (i = 0; i < 100; i++)
{
chain[i+1].base = chain[i].base;
}
return chain;
}
foo:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
ldrh r2, [r0, #1] <- unaligned
add r1, r0, #300
and ip, r2, #255
add r1, r1, #3
lsr r2, r2, #8
add r3, r0, #3
.L2:
strb ip, [r3, #1]
strb r2, [r3, #2]
add r3, r3, #3
cmp r3, r1
bne .L2
bx lr