From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11625 invoked by alias); 16 Nov 2012 19:17:22 -0000 Received: (qmail 11540 invoked by uid 48); 16 Nov 2012 19:17:04 -0000 From: "glisse at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg01549.txt.bz2 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 __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