From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3698 invoked by alias); 16 Oct 2014 09:47:15 -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 Received: (qmail 3663 invoked by uid 48); 16 Oct 2014 09:47:12 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63551] [4.9/5 Regression] wrong code (segfaults) at -Os on x86_64-linux-gnu Date: Thu, 16 Oct 2014 09:47: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: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed 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-10/txt/msg01233.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63551 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|UNCONFIRMED |NEW Last reconfirmed| |2014-10-16 CC| |hubicka at gcc dot gnu.org Target Milestone|--- |5.0 Summary|wrong code (segfaults) at |[4.9/5 Regression] wrong |-Os on x86_64-linux-gnu |code (segfaults) at -Os on | |x86_64-linux-gnu Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- Confirmed. fn2 () { : d = 0; __builtin_unreachable (); } ? Somehow IPA inline inserts this call. Considering fn1/2 with 7 size to be inlined into fn2/3 in t.c:22 Estimated badness is -1073741826, frequency 1.00. Badness calculation for fn2/3 -> fn1/2 size growth -2, time 0 big_speedup -1073741826: Growth -2 <= 0 Introduced new external node (__builtin_unreachable/7). Processing frequency fn1 from ipa-inline-analysis.c:edge_set_predicate 757 if (predicate && false_predicate_p (predicate) && e->callee) 758 { 759 struct cgraph_node *callee = !e->inline_failed ? e->callee : NULL; 760 761 e->redirect_callee (cgraph_node::get_create 762 (builtin_decl_implicit (BUILT_IN_UNREACHABLE))); 763 e->inline_failed = CIF_UNREACHABLE; 764 if (callee) 765 callee->remove_symbol_and_inline_clones (); thus there is some bug in predicate compute.