public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-65766-4-RAbEF1fNfq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65766-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65766

--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> 2015-10-06  Louis Krupp     <louis.krupp@zoho.com>
>
>	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: <gcc-bugs-return-498931-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.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: <bug-67879-4-iLoIw02UE4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67879-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67879-4@http.gcc.gnu.org/bugzilla/>
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?idg879

Richard Biener <rguenth at gcc dot gnu.org> 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 <rguenth at gcc dot gnu.org> ---
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;

  <bb 2>:
  _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

  <bb 2>:
  if (a_2(D) < b_3(D))
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 3>:
  iftmp.0_6 = *c_5(D);
  goto <bb 5>;

  <bb 4>:
  _7 = *c_5(D);
  iftmp.0_8 = _7 + 1;

  <bb 5>:
  # iftmp.0_1 = PHI <iftmp.0_6(3), iftmp.0_8(4)>

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#286
[Bug 23286] Missed code hoisting optimization


  parent reply	other threads:[~2015-10-07  7:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15  0:19 [Bug fortran/65766] New: " giorgianb at gmail dot com
2015-04-15  1:52 ` [Bug fortran/65766] " jvdelisle at gcc dot gnu.org
2015-07-28  8:26 ` t56xjcu6dh at snkmail dot com
2015-07-28  8:38 ` t56xjcu6dh at snkmail dot com
2015-07-30 12:11 ` dominiq at lps dot ens.fr
2015-09-10 10:00 ` dominiq at lps dot ens.fr
2015-09-10 10:01 ` dominiq at lps dot ens.fr
2015-09-10 10:04 ` dominiq at lps dot ens.fr
2015-10-06 23:47 ` lkrupp at gcc dot gnu.org
2015-10-07  0:14 ` lkrupp at gcc dot gnu.org
2015-10-07  7:47 ` dominiq at lps dot ens.fr [this message]
2015-10-07  9:30 ` louis.krupp at zoho dot com

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-65766-4-RAbEF1fNfq@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).