public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/68015] New: ICE in s390_emit_compare
@ 2015-10-19 14:47 matz at gcc dot gnu.org
  2015-10-20 10:41 ` [Bug target/68015] " krebbel at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: matz at gcc dot gnu.org @ 2015-10-19 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 68015
           Summary: ICE in s390_emit_compare
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matz at gcc dot gnu.org
  Target Milestone: ---

$ cat s390x-ice-datetime.i
/* -O2 -march=z196 --> ICE in s390_emit_compare */
extern long useme (long, ...);

void foo (void)
{
        long secs = useme (41);
        long utc_secs = useme (42);
        long h, m;

        utc_secs = useme (42);
        h = secs / 3600;
        m = secs / 60;
        if (utc_secs >= 86400) {
                m = 59;
                h--;
                if (h < 0) {
                        h = 23;
                }
        }
        useme(h,m);
}

$ ./cc1 -fpreprocessed -march=z196 -O2 s390x-ice-datetime.i 
s390x-ice-datetime.i: In function ‘foo’:
s390x-ice-datetime.i:21:1: internal compiler error: in s390_emit_compare, at
config/s390/s390.c:1708
 }
 ^
0x10f3155 s390_emit_compare(rtx_code, rtx_def*, rtx_def*)
        ../../gcc/gcc/config/s390/s390.c:1707
0x1262985 gen_movdicc(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        ../../gcc/gcc/config/s390/s390.md:6112
0xc2beb2 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
        ../../gcc/gcc/recog.h:303
0xc2b98e maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        ../../gcc/gcc/optabs.c:6721
0xc2bc8b maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        ../../gcc/gcc/optabs.c:6751
0xc259b8 emit_conditional_move(rtx_def*, rtx_code, rtx_def*, rtx_def*,
machine_mode, rtx_def*, rtx_def*, machine_mode, int)
        ../../gcc/gcc/optabs.c:4201
0x13d8f38 noce_emit_cmove
        ../../gcc/gcc/ifcvt.c:1607
0x13dd882 cond_move_convert_if_block
        ../../gcc/gcc/ifcvt.c:3449
0x13ddc09 cond_move_process_if_block
        ../../gcc/gcc/ifcvt.c:3536
0x13de284 noce_find_if_block
        ../../gcc/gcc/ifcvt.c:3704
0x13de93b find_if_header
        ../../gcc/gcc/ifcvt.c:3905
0x13e1434 if_convert
        ../../gcc/gcc/ifcvt.c:5051
0x13e1773 execute
        ../../gcc/gcc/ifcvt.c:5198
>From gcc-bugs-return-499946-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 19 14:50:51 2015
Return-Path: <gcc-bugs-return-499946-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 100373 invoked by alias); 19 Oct 2015 14:50:51 -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 100189 invoked by uid 48); 19 Oct 2015 14:50:46 -0000
From: "matz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/68015] ICE in s390_emit_compare
Date: Mon, 19 Oct 2015 14:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: matz at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
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: cc
Message-ID: <bug-68015-4-vMfvxAlBzn@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-68015-4@http.gcc.gnu.org/bugzilla/>
References: <bug-68015-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/msg01501.txt.bz2
Content-length: 614

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

Michael Matz <matz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krebbel at gcc dot gnu.org

--- Comment #1 from Michael Matz <matz at gcc dot gnu.org> ---
This also happens on the gcc-5-branch (as of now, i.e. r228958).  It requires
the -march=z196, and it hits us in multiple packages (the testcase extracted
from perl-DateTime, but e.g. also in qt3).  This -march level is the
default for us.


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

* [Bug target/68015] ICE in s390_emit_compare
  2015-10-19 14:47 [Bug target/68015] New: ICE in s390_emit_compare matz at gcc dot gnu.org
@ 2015-10-20 10:41 ` krebbel at gcc dot gnu.org
  2015-10-20 13:38 ` krebbel at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-10-20 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-10-20
           Assignee|unassigned at gcc dot gnu.org      |krebbel at gcc dot gnu.org
     Ever confirmed|0                           |1


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

* [Bug target/68015] ICE in s390_emit_compare
  2015-10-19 14:47 [Bug target/68015] New: ICE in s390_emit_compare matz at gcc dot gnu.org
  2015-10-20 10:41 ` [Bug target/68015] " krebbel at gcc dot gnu.org
@ 2015-10-20 13:38 ` krebbel at gcc dot gnu.org
  2015-10-22  8:24 ` krebbel at gcc dot gnu.org
  2015-10-22  8:29 ` krebbel at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-10-20 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Created attachment 36549
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36549&action=edit
Experimental fix

I'm regression testing the attached patch.


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

* [Bug target/68015] ICE in s390_emit_compare
  2015-10-19 14:47 [Bug target/68015] New: ICE in s390_emit_compare matz at gcc dot gnu.org
  2015-10-20 10:41 ` [Bug target/68015] " krebbel at gcc dot gnu.org
  2015-10-20 13:38 ` krebbel at gcc dot gnu.org
@ 2015-10-22  8:24 ` krebbel at gcc dot gnu.org
  2015-10-22  8:29 ` krebbel at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-10-22  8:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Author: krebbel
Date: Thu Oct 22 08:24:01 2015
New Revision: 229163

URL: https://gcc.gnu.org/viewcvs?rev=229163&root=gcc&view=rev
Log:
S/390: PR68015 Fix ICE in s390_emit_compare

gcc/ChangeLog:

2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

        PR target/68015
        * config/s390/s390.md (mov<mode>cc): Emit compare only if we don't
        already have a comparison result.

gcc/testsuite/ChangeLog:

2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

        PR target/68015
        * gcc.target/s390/pr68015.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/s390/pr68015.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/s390/s390.md
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/68015] ICE in s390_emit_compare
  2015-10-19 14:47 [Bug target/68015] New: ICE in s390_emit_compare matz at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-10-22  8:24 ` krebbel at gcc dot gnu.org
@ 2015-10-22  8:29 ` krebbel at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-10-22  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Author: krebbel
Date: Thu Oct 22 08:28:57 2015
New Revision: 229165

URL: https://gcc.gnu.org/viewcvs?rev=229165&root=gcc&view=rev
Log:
S/390: PR68015 Fix ICE in s390_emit_compare

gcc/ChangeLog:

2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

        Backport from mainline
        2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

        PR target/68015
        * config/s390/s390.md (mov<mode>cc): Emit compare only if we don't
        already have a comparison result.

gcc/testsuite/ChangeLog:

2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

        Backport from mainline
        2015-10-22  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

        PR target/68015
        * gcc.target/s390/pr68015.c: New test.


Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/pr68015.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/config/s390/s390.md
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2015-10-22  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-19 14:47 [Bug target/68015] New: ICE in s390_emit_compare matz at gcc dot gnu.org
2015-10-20 10:41 ` [Bug target/68015] " krebbel at gcc dot gnu.org
2015-10-20 13:38 ` krebbel at gcc dot gnu.org
2015-10-22  8:24 ` krebbel at gcc dot gnu.org
2015-10-22  8:29 ` krebbel at gcc dot gnu.org

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