From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62571 invoked by alias); 7 Oct 2015 07:47:49 -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 62489 invoked by uid 48); 7 Oct 2015 07:47:41 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/65766] gFortran Compiler SEGFAULTING on compiling simple program Date: Wed, 07 Oct 2015 07:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: 2015-10/txt/msg00485.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65766 --- Comment #10 from Dominique d'Humieres --- > 2015-10-06 Louis Krupp > > PR fortran/65766 > * gfortran.dg/substr_alloc_string_comp_1.f90: New. AFAICT the test has not been committed. >>From gcc-bugs-return-498931-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 07 07:56:00 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 84423 invoked by alias); 7 Oct 2015 07:56:00 -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 84330 invoked by uid 48); 7 Oct 2015 07:55:56 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67879] unnecessary jump in ternary Date: Wed, 07 Oct 2015 07:56: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.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on component version dependson 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: 2015-10/txt/msg00486.txt.bz2 Content-length: 1968 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67879 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2015-10-07 Component|c |tree-optimization Version|unknown |5.2.0 Depends on| |23286 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- With GCC 5 at -O2 it's _Z1fiiPi: .LFB0: .cfi_startproc cmpl %esi, %edi movl (%rdx), %eax jl .L5 addl $1, %eax ret .p2align 4,,10 .p2align 3 .L5: rep ret vs. _Z2f2iiPi: .LFB1: .cfi_startproc xorl %eax, %eax cmpl %esi, %edi setge %al addl (%rdx), %eax ret where f2 is already in if-converted form on the GIMPLE level: int f2(int, int, int*) (int a, int b, int * c) { int _6; int _7; bool _8; int _9; : _6 = *c_5(D); _8 = a_2(D) >= b_3(D); _9 = (int) _8; _7 = _6 + _9; return _7; The reason why we are not if-converting f on the GIMPLE level is the lack of a code hoisting pass and thus we have : if (a_2(D) < b_3(D)) goto ; else goto ; : iftmp.0_6 = *c_5(D); goto ; : _7 = *c_5(D); iftmp.0_8 = _7 + 1; : # iftmp.0_1 = PHI which "confuses" phiopt enough. Only RTL hoists the loads (in 261r.mach?). PR23286 tracks the lack of code hoisting on GIMPLE. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23286 [Bug 23286] Missed code hoisting optimization