public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/55359] New: [4.8 Regression] ICE in simplify_subreg accessing an unaligned subvector
Date: Fri, 16 Nov 2012 19:17:00 -0000	[thread overview]
Message-ID: <bug-55359-4@http.gcc.gnu.org/bugzilla/> (raw)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55359

             Bug #: 55359
           Summary: [4.8 Regression] ICE in simplify_subreg accessing an
                    unaligned subvector
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org


I am not quite sure if this code is legal. I noticed it first with a
BIT_FIELD_REF (generated by a local patch), but it also happens with a MEM_REF.
The code generated by 4.7 seems correct, even if it isn't optimal.

$ cat s.c
#include <x86intrin.h>

__m128d f(__m256d x){
  return *((__m128d*)((double*)&x+1));
}
$ gcc s.c -mavx2 -S -O2
s.c: In function 'f':
s.c:4:3: internal compiler error: in simplify_subreg, at simplify-rtx.c:5688
   return *((__m128d*)((double*)&x+1));
   ^
0x9052f6 simplify_subreg(machine_mode, rtx_def*, machine_mode, unsigned int)
    /data/repos/gcc/pristine/gcc/simplify-rtx.c:5688
0x90b8bd simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned
int)
    /data/repos/gcc/pristine/gcc/simplify-rtx.c:5903
0x6ec7e8 extract_bit_field_1
    /data/repos/gcc/pristine/gcc/expmed.c:1482
0x6ecda3 extract_bit_field(rtx_def*, unsigned long, unsigned long, int, bool,
rtx_def*, machine_mode, machine_mode)
    /data/repos/gcc/pristine/gcc/expmed.c:1711
0x6fa77e expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
    /data/repos/gcc/pristine/gcc/expr.c:10006
0x6fb505 expand_expr
    /data/repos/gcc/pristine/gcc/expr.h:444
0x6fb505 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
    /data/repos/gcc/pristine/gcc/expr.c:9614
0x6fb623 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
    /data/repos/gcc/pristine/gcc/expr.c:9179
0x9152a8 expand_expr
    /data/repos/gcc/pristine/gcc/expr.h:444
0x9152a8 expand_return(tree_node*)
    /data/repos/gcc/pristine/gcc/stmt.c:1546
0x635273 expand_gimple_stmt_1
    /data/repos/gcc/pristine/gcc/cfgexpand.c:2082
0x635273 expand_gimple_stmt
    /data/repos/gcc/pristine/gcc/cfgexpand.c:2204
0x636c82 expand_gimple_basic_block
    /data/repos/gcc/pristine/gcc/cfgexpand.c:3978
0x639aee gimple_expand_cfg
    /data/repos/gcc/pristine/gcc/cfgexpand.c:4497


             reply	other threads:[~2012-11-16 19:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 19:17 glisse at gcc dot gnu.org [this message]
2012-11-19 11:40 ` [Bug middle-end/55359] " jakub at gcc dot gnu.org
2012-11-19 19:00 ` rsandifo at gcc dot gnu.org
2012-11-19 19:11 ` jakub at gcc dot gnu.org
2012-11-19 19:14 ` rsandifo at gcc dot gnu.org
2012-11-19 23:28 ` rsandifo at gcc dot gnu.org
2012-11-19 23:29 ` rsandifo 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-55359-4@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).