https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62009 jgreenhalgh at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Target|i686 |i686, | |arm-none-linux-gnueabihf Status|UNCONFIRMED |NEW Last reconfirmed| |2014-08-04 CC| |jgreenhalgh at gcc dot gnu.org Summary|Bootstrap failure on i686 |Bootstrap failure in | |vec.h::splice Ever confirmed|0 |1 --- Comment #1 from jgreenhalgh at gcc dot gnu.org --- I saw something very similar on ARM, but I couldn't reproduce it across two other bootstraps with the same configuration, nor did I see the ICE when trying to resume the build by typing "make". .../configure --with-cpu=cortex-a9 --with-fpu=neon-fp16 --with-mode=thumb --with-float=hard --enable-languages=c,c++,fortran /work/jamgre01//gcc-src/gcc/tree-ssa-pre.c: In function ‘pre_expr_d* bitmap_find_leader(bitmap_set_t, unsigned int)’: /work/jamgre01//gcc-src/gcc/tree-ssa-pre.c:1837:1: internal compiler error: in splice, at vec.h:844 bitmap_find_leader (bitmap_set_t set, unsigned int val) ^ 0xaa2927 vec<_edge_var_map, va_heap, vl_embed>::splice(vec<_edge_var_map, va_heap, vl_embed>&) /work/jamgre01//gcc-src/gcc/vec.h:844 0xaa253d vec<_edge_var_map, va_heap, vl_ptr>::splice(vec<_edge_var_map, va_heap, vl_ptr>&) /work/jamgre01//gcc-src/gcc/vec.h:1495 0xaa1fab vec<_edge_var_map, va_heap, vl_ptr>::safe_splice(vec<_edge_var_map, va_heap, vl_ptr>&) /work/jamgre01//gcc-src/gcc/vec.h:1512 0xa9ddbb redirect_edge_var_map_dup(edge_def*, edge_def*) /work/jamgre01//gcc-src/gcc/tree-ssa.c:113 0x4d8bfd redirect_edge_succ_nodup(edge_def*, basic_block_def*) /work/jamgre01//gcc-src/gcc/cfghooks.c:437 0xa9dee5 ssa_redirect_edge(edge_def*, basic_block_def*) /work/jamgre01//gcc-src/gcc/tree-ssa.c:173 0x8fd663 gimple_try_redirect_by_replacing_jump /work/jamgre01//gcc-src/gcc/tree-cfg.c:5419 0x8fd6e7 gimple_redirect_edge_and_branch /work/jamgre01//gcc-src/gcc/tree-cfg.c:5450 0x4d89d5 redirect_edge_and_branch(edge_def*, basic_block_def*) /work/jamgre01//gcc-src/gcc/cfghooks.c:356 0x907a79 remove_forwarder_block /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:445 0x9080a7 cleanup_tree_cfg_bb /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:633 0x90818d cleanup_tree_cfg_1 /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:675 0x9082cb cleanup_tree_cfg_noloop /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:731 0x9083bd cleanup_tree_cfg() /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:786 0x90897f execute_cleanup_cfg_post_optimizing /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:1081 0x908b29 execute /work/jamgre01//gcc-src/gcc/tree-cfgcleanup.c:1143 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. >From gcc-bugs-return-457698-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Aug 04 12:51:59 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 2104 invoked by alias); 4 Aug 2014 12:51:58 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 2073 invoked by uid 48); 4 Aug 2014 12:51:55 -0000 From: "tkoeppe at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/62006] Bad code generation with -O3 (possibly due to -ftree-partial-pre) Date: Mon, 04 Aug 2014 12:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoeppe at google dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00195.txt.bz2 Content-length: 459 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62006 --- Comment #6 from Thomas Köppe --- Created attachment 33236 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33236&action=edit Fixed demo that doesn't have UB on account of invalid pointer arithmetic Here's a (very lazily) fixed version of the code that allocates from an arena that is a single, large array. The same problem persists in both GCC and Clang. >From gcc-bugs-return-457699-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Aug 04 12:58:03 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 7417 invoked by alias); 4 Aug 2014 12:58:03 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 6813 invoked by uid 48); 4 Aug 2014 12:57:59 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/61672] Less redundant instructions deleted by pre_delete after r208113. Date: Mon, 04 Aug 2014 12:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on assigned_to everconfirmed attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00196.txt.bz2 Content-length: 2530 https://gcc.gnu.org/bugzilla/show_bug.cgi?ida672 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2014-08-04 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #6 from Richard Biener --- Created attachment 33237 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3237&actioníit patch Ok, I see stuff like the following in the 179r.pre dump differences @@ -1524,6 +1524,11 @@ Loads : (insn_list:REG_DEP_TRUE 21 (nil)) Stores : (nil) + Pattern ( 0): (mem/f:SI (plus:SI (reg/v/f:SI 93 [ pfile ]) + (const_int 12 [0xc])) [3 pfile_5(D)->u_buff+0 S4 A32]) + Loads : (insn_list:REG_DEP_TRUE 19 (nil)) + Stores : (nil) + Pattern ( 0): (mem/f:SI (plus:SI (reg/v/f:SI 83 [ buff ]) (const_int 12 [0xc])) [3 buff_6->limit+0 S4 A32]) Loads : (insn_list:REG_DEP_TRUE 9 (nil)) @@ -1536,11 +1541,11 @@ Pattern ( 0): (mem/f:SI (plus:SI (reg/v/f:SI 93 [ pfile ]) (const_int 12 [0xc])) [3 pfile_5(D)->u_buff+0 S4 A32]) - Loads : (insn_list:REG_DEP_TRUE 19 (insn_list:REG_DEP_TRUE 7 (nil))) + Loads : (insn_list:REG_DEP_TRUE 7 (nil)) Stores : (nil) Ah, gcse ends up calling exp_equiv_p which does /* Can't merge two expressions in different alias sets, since we can decide that the expression is transparent in a block when it isn't, due to it being set with the different alias set. Also, can't merge two expressions with different MEM_ATTRS. They could e.g. be two different entities allocated into the same space on the stack (see e.g. PR25130). In that case, the MEM addresses can be the same, even though the two MEMs are absolutely not equivalent. But because really all MEM attributes should be the same for equivalent MEMs, we just use the invariant that MEMs that have the same attributes share the same mem_attrs data structure. */ if (MEM_ATTRS (x) != MEM_ATTRS (y)) return 0; cfgcleanup.c has similar code. Untested fix attached, with this we create the same code for the pr58464 testcase.