public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/16493] New: Unaligned accesses broken on ppc64
@ 2004-07-12 12:38 jakub at gcc dot gnu dot org
2004-07-12 14:28 ` [Bug target/16493] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-07-12 12:38 UTC (permalink / raw)
To: gcc-bugs
struct __attribute__((packed)) G { unsigned char i; unsigned long l; };
unsigned long
foo (struct G x)
{
return x.l;
}
fails to compile at -O1 and higher.
e.c: In function `foo':
e.c:6: error: insn does not satisfy its constraints:
(insn:HI 24 33 27 0 (set (reg/i:DI 3 3 [ <result> ])
(mem/s:DI (plus:DI (reg:DI 9 9)
(const_int 49 [0x31])) [4 x.l+0 S8 A8])) 326 {*movdi_internal64}
(insn_list 7 (insn_list 8 (nil)))
(nil))
e.c:6: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:378
This was fixed for 3.4 with PR rtl-optimization/13674 patch.
For this testcase though, -fnew-ra doesn't help at all.
ppc64 doesn't have STRICT_ALIGNMENT != 0 (unless -fstrict-align, but that fixes
the testcase), so I don't see how movdi_internal64 insn can refuse to handle
non-aligned loads. SLOW_UNALIGNED_ACCESS will handle most of the cases by doing
the load in pieces, but that still doesn't mean such instructions can't be
generated.
--
Summary: Unaligned accesses broken on ppc64
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16493
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/16493] Unaligned accesses broken on ppc64
2004-07-12 12:38 [Bug target/16493] New: Unaligned accesses broken on ppc64 jakub at gcc dot gnu dot org
@ 2004-07-12 14:28 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-12 14:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 14:28 -------
*** This bug has been marked as a duplicate of 16491 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16493
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-12 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 12:38 [Bug target/16493] New: Unaligned accesses broken on ppc64 jakub at gcc dot gnu dot org
2004-07-12 14:28 ` [Bug target/16493] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).