public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57748] [4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array
Date: Wed, 04 Sep 2013 09:33:00 -0000 [thread overview]
Message-ID: <bug-57748-4-7PvmLcgclv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57748-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57748
--- Comment #28 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #19)
> Barking up wrong trees. Hacky fix looks like:
>
> Index: gcc/expr.c
> ===================================================================
> --- gcc/expr.c (revision 202043)
> +++ gcc/expr.c (working copy)
> @@ -4753,6 +4753,9 @@ expand_assignment (tree to, tree from, b
> {
> enum machine_mode address_mode;
> rtx offset_rtx;
> + rtx saved_to_rtx = to_rtx;
> + if (misalignp)
> + to_rtx = mem;
>
> if (!MEM_P (to_rtx))
> {
> @@ -4785,6 +4788,11 @@ expand_assignment (tree to, tree from, b
> to_rtx = offset_address (to_rtx, offset_rtx,
> highest_pow2_factor_for_target (to,
> offset));
> + if (misalignp)
> + {
> + mem = to_rtx;
> + to_rtx = saved_to_rtx;
> + }
> }
>
> /* No action is needed if the target is not a memory and the field
>
>
this patch generates wrong code too:
foo:
.LFB9:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
movq %rdi, %rbx
subq $16, %rsp
.cfi_def_cfa_offset 32
call get_i
movdqu (%rbx), %xmm0
cltq
movq .LC1(%rip), %xmm1
psrldq $8, %xmm0
punpcklqdq %xmm0, %xmm1
movdqu %xmm1, 16(%rbx,%rax,8)
addq $16, %rsp
.cfi_def_cfa_offset 16
popq %rbx
.cfi_def_cfa_offset 8
ret
.cfi_endproc
loads *s into xmm0, modifies low part,
writes back at s->b[0] and s->b[1].
next prev parent reply other threads:[~2013-09-04 9:33 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 3:57 [Bug target/57748] New: ICE on ARM with -mfloat-abi=softfp -mfpu=neo raj.khem at gmail dot com
2013-06-28 3:58 ` [Bug target/57748] " raj.khem at gmail dot com
2013-06-28 4:00 ` raj.khem at gmail dot com
2013-06-28 14:52 ` jamborm at gcc dot gnu.org
2013-07-03 16:34 ` philb at gnu dot org
2013-07-05 13:24 ` [Bug tree-optimization/57748] " ramana at gcc dot gnu.org
2013-07-05 15:54 ` [Bug middle-end/57748] [4.8/4.9 Regression] ICE on ARM with -mfloat-abi=softfp -mfpu=neon pinskia at gcc dot gnu.org
2013-07-26 16:47 ` jamborm at gcc dot gnu.org
2013-07-29 20:49 ` bernd.edlinger at hotmail dot de
2013-07-30 14:53 ` jamborm at gcc dot gnu.org
2013-07-30 22:53 ` bernd.edlinger at hotmail dot de
2013-07-31 14:08 ` jamborm at gcc dot gnu.org
2013-07-31 16:39 ` jamborm at gcc dot gnu.org
2013-07-31 16:42 ` jamborm at gcc dot gnu.org
2013-08-01 2:10 ` bernd.edlinger at hotmail dot de
2013-08-01 14:40 ` [Bug middle-end/57748] [4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array jamborm at gcc dot gnu.org
2013-08-02 7:11 ` bernd.edlinger at hotmail dot de
2013-08-02 12:31 ` jamborm at gcc dot gnu.org
2013-08-02 22:49 ` bernd.edlinger at hotmail dot de
2013-08-03 22:36 ` david.abdurachmanov at gmail dot com
2013-08-06 20:30 ` david.abdurachmanov at gmail dot com
2013-08-28 8:20 ` rguenth at gcc dot gnu.org
2013-08-28 9:00 ` bernd.edlinger at hotmail dot de
2013-08-29 21:29 ` bernd.edlinger at hotmail dot de
2013-08-30 18:21 ` jamborm at gcc dot gnu.org
2013-08-31 18:13 ` bernd.edlinger at hotmail dot de
2013-09-02 23:35 ` bernd.edlinger at hotmail dot de
2013-09-03 10:12 ` rguenth at gcc dot gnu.org
2013-09-04 9:18 ` bernd.edlinger at hotmail dot de
2013-09-04 9:33 ` bernd.edlinger at hotmail dot de [this message]
2013-09-04 9:59 ` rguenth at gcc dot gnu.org
2013-09-04 10:04 ` [Bug middle-end/57748] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2013-09-04 10:17 ` bernd.edlinger at hotmail dot de
2013-09-06 7:05 ` bernd.edlinger at hotmail dot de
2013-09-06 8:12 ` rguenth at gcc dot gnu.org
2013-09-09 6:41 ` bernd.edlinger at hotmail dot de
2013-09-09 13:02 ` bernd.edlinger at hotmail dot de
2013-09-10 7:56 ` bernd.edlinger at hotmail dot de
2013-09-18 14:44 ` jamborm at gcc dot gnu.org
2013-09-18 16:32 ` bernd.edlinger at hotmail dot de
2013-09-19 9:03 ` bernd.edlinger at hotmail dot de
2013-09-20 7:38 ` rguenther at suse dot de
2013-09-20 13:50 ` bernd.edlinger at hotmail dot de
2013-09-20 14:10 ` edlinger at gcc dot gnu.org
2013-10-16 9:49 ` jakub at gcc dot gnu.org
2013-10-30 13:07 ` rguenth at gcc dot gnu.org
2013-11-14 15:19 ` bernd.edlinger at hotmail dot de
2013-11-21 14:27 ` paulo@matos-sorge.com
2013-11-21 14:38 ` bernd.edlinger at hotmail dot de
2013-11-21 14:40 ` paulo@matos-sorge.com
2013-11-22 11:38 ` paulo@matos-sorge.com
2013-11-28 9:50 ` paulo@matos-sorge.com
2014-01-08 17:25 ` edlinger at gcc dot gnu.org
2014-02-05 17:54 ` mpolacek at gcc dot gnu.org
2014-05-22 9:05 ` [Bug middle-end/57748] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-12-19 13:36 ` [Bug middle-end/57748] [4.8 " jakub at gcc dot gnu.org
2015-01-16 15:48 ` ramana at gcc dot gnu.org
2015-01-16 16:08 ` bernd.edlinger at hotmail dot de
2015-01-16 16:36 ` ramana at gcc dot gnu.org
2015-01-16 19:45 ` mikpelinux at gmail dot com
2015-01-22 8:28 ` mikpelinux at gmail dot com
2015-01-25 14:28 ` mikpelinux at gmail dot com
2015-01-26 23:40 ` bernd.edlinger at hotmail dot de
2015-01-27 8:47 ` mikpelinux at gmail dot com
2015-01-27 17:08 ` edlinger at gcc dot gnu.org
2015-01-27 17:10 ` edlinger at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-57748-4-7PvmLcgclv@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).