public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/59814] New: powerpc64le ICE with -O2 -mpower8 -ffast-math
@ 2014-01-14 21:45 anton at samba dot org
  2014-01-15  0:06 ` [Bug target/59814] " amodra at gmail dot com
  2014-02-15 11:10 ` amodra at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: anton at samba dot org @ 2014-01-14 21:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59814

            Bug ID: 59814
           Summary: powerpc64le ICE with -O2 -mpower8 -ffast-math
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anton at samba dot org

The following test case:

/* -O2 -mcpu=power8 -ffast-math */

float val;
int verbose;

void bar(float x);

void foo(void)
{
        if (val < 0.0) {
                val = 1.0;
                if (!verbose)
                        zot();
                bar(val);
        }
}

fails with:

# gcc -c -O2 -mcpu=power8 -ffast-math testcase.c
testcase.c: In function ‘foo’:
testcase.c:16:1: error: unrecognizable insn:
 }
 ^
(insn 52 16 3 3 (parallel [
            (set (reg:SF 33 1 [orig:125 D.2152 ] [125])
                (unspec:SF [
                        (reg:SF 9 9 [131])
                    ] UNSPEC_P8V_RELOAD_FROM_GPR))
            (clobber (reg:DI 8 8))
        ]) -1
     (nil))
testcase.c:16:1: internal compiler error: in extract_insn, at recog.c:2154
>From gcc-bugs-return-440357-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jan 14 21:59:19 2014
Return-Path: <gcc-bugs-return-440357-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21827 invoked by alias); 14 Jan 2014 21:59:19 -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 21496 invoked by uid 48); 14 Jan 2014 21:59:14 -0000
From: "virkony at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59813] tail-call elimintation didn't fired with left-shift of char to cout
Date: Tue, 14 Jan 2014 21:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: virkony at gmail dot com
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:
Message-ID: <bug-59813-4-YeJsSp5w31@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59813-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59813-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: 2014-01/txt/msg01499.txt.bz2
Content-length: 444

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY813

--- Comment #1 from Nikolay Orliuk <virkony at gmail dot com> ---
In 4.7.3 that code works, but changing it to

void foo()
{
    cout << "x" << endl; // ok
    cout << 'x' << endl; // kills tail-call elimination in gcc 4.8.2
    struct {} bar; // kills tail-call elimination in 4.7.3
    foo();
}

Removing either "bar" or 'x' results in normal infinite loop.
In 4.5.4 this works fine as is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/59814] powerpc64le ICE with -O2 -mpower8 -ffast-math
  2014-01-14 21:45 [Bug target/59814] New: powerpc64le ICE with -O2 -mpower8 -ffast-math anton at samba dot org
@ 2014-01-15  0:06 ` amodra at gmail dot com
  2014-02-15 11:10 ` amodra at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: amodra at gmail dot com @ 2014-01-15  0:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59814

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
Created attachment 31835
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31835&action=edit
make rs6000.c match rs6000.md

This patch simply avoids the ICE by ensuring we don't generate these insns in
the first place.  The insns currently have && WORDS_BIG_ENDIAN in their
predicates.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/59814] powerpc64le ICE with -O2 -mpower8 -ffast-math
  2014-01-14 21:45 [Bug target/59814] New: powerpc64le ICE with -O2 -mpower8 -ffast-math anton at samba dot org
  2014-01-15  0:06 ` [Bug target/59814] " amodra at gmail dot com
@ 2014-02-15 11:10 ` amodra at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: amodra at gmail dot com @ 2014-02-15 11:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59814

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
   Target Milestone|---                         |4.9.0

--- Comment #2 from Alan Modra <amodra at gmail dot com> ---
Fix by rev 206668

*** This bug has been marked as a duplicate of bug 59844 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-15 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 21:45 [Bug target/59814] New: powerpc64le ICE with -O2 -mpower8 -ffast-math anton at samba dot org
2014-01-15  0:06 ` [Bug target/59814] " amodra at gmail dot com
2014-02-15 11:10 ` amodra at gmail dot com

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).