public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/64377] nios2 compile error in options-save.c
Date: Wed, 14 Jan 2015 11:22:00 -0000	[thread overview]
Message-ID: <bug-64377-4-S9gVII6dSs@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64377-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for testing, there's patch I've just sent to gcc-patches ML:
https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01008.html.

Martin
>From gcc-bugs-return-473178-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 11:34:14 2015
Return-Path: <gcc-bugs-return-473178-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5149 invoked by alias); 14 Jan 2015 11:34:13 -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 4535 invoked by uid 48); 14 Jan 2015 11:34:07 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64541] FRE pass optimization failure
Date: Wed, 14 Jan 2015 11:34: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: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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-Flags:
X-Bugzilla-Changed-Fields: keywords cc short_desc
Message-ID: <bug-64541-4-gkfWlAPAF1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64541-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64541-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-01/txt/msg01172.txt.bz2
Content-length: 1299

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd541

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|rguenther at suse dot de           |rguenth at gcc dot gnu.org
            Summary|.fre1 pass optimization     |FRE pass optimization
                   |failure                     |failure

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The sources are different in that 2.c dereferences *p one more time after
*q is stored to while 1.c dereferences *q for the return value.  Thus an
equivalent 2.c would be

int f (int ** p, int ** q)
{
        ++*p;
        *q = *p;
        return **q;
}

it is true that we can still optimize the original 2.c but only because
*p and *q are equivalent (but it is probably not worthwhile the compile-time
cost
handling this). That is, we have to assume that p == q and thus the store to *q
invalidates the previously load *p.

I also think we have a duplicate report for this somewhere.

Simpler testcase (which is probably that in the duplicate):

int foo (int *p, int *q)
{
  *p = 1;
  *q = 1;
  return *p;
}


  parent reply	other threads:[~2015-01-14 11:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 15:23 [Bug target/64377] New: " joel at gcc dot gnu.org
2014-12-22 15:27 ` [Bug target/64377] " joel at gcc dot gnu.org
2014-12-29  2:11 ` sandra at codesourcery dot com
2015-01-08 22:25 ` sandra at codesourcery dot com
2015-01-12 18:02 ` joel at gcc dot gnu.org
2015-01-13 14:01 ` sandra at codesourcery dot com
2015-01-13 15:27 ` marxin at gcc dot gnu.org
2015-01-13 20:17 ` sandra at codesourcery dot com
2015-01-13 20:40 ` marxin at gcc dot gnu.org
2015-01-13 23:14 ` sandra at codesourcery dot com
2015-01-14 11:22 ` marxin at gcc dot gnu.org [this message]
2015-01-15  9:54 ` marxin at gcc dot gnu.org
2015-01-20 18:46 ` joel at gcc dot gnu.org
2015-01-20 19:00 ` joel at gcc dot gnu.org
2015-02-09 16:17 ` marxin at gcc dot gnu.org
2015-02-09 16:22 ` joel at gcc dot gnu.org

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-64377-4-S9gVII6dSs@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).