public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/64357] New: ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579
@ 2014-12-19  7:37 su at cs dot ucdavis.edu
  2014-12-19 11:48 ` [Bug tree-optimization/64357] [5 Regression] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2014-12-19  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64357
           Summary: ICE at -Os on x86_64-linux-gnu in
                    check_loop_closed_ssa_use, at
                    tree-ssa-loop-manip.c:579
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-Os on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It is a regression from 4.9.x.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 5.0.0 20141218 (experimental) [trunk revision 218871] (GCC) 

$ 
$ gcc-trunk -O1 -c small.c
$ gcc-trunk -O2 -c small.c
$ gcc-4.9 -Os -c small.c
$ 
$ gcc-trunk -Os -c small.c
small.c: In function ‘fn3’:
small.c:25:1: internal compiler error: in check_loop_closed_ssa_use, at
tree-ssa-loop-manip.c:579
 fn3 ()
 ^
0xbb7c5f check_loop_closed_ssa_use
    ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:579
0xbb97da verify_loop_closed_ssa(bool)
    ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:624
0x9a8026 execute_function_todo
    ../../gcc-trunk/gcc/passes.c:1955
0x9a88b3 execute_todo
    ../../gcc-trunk/gcc/passes.c:1997
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ 


-----------------------


int a, b, c, d, e, f;

long long
fn1 (int p)
{
  return p ? p : 1;
}

static int
fn2 ()
{
lbl:
  for (; f;)
    return 0;
  for (;;)
    {
      for (b = 0; b; ++b)
    if (d)
      goto lbl;
      c = e;
    }
}

void
fn3 ()
{
  for (; a; a = fn1 (a))
    {
      fn2 ();
      e = 0;
    }
}
>From gcc-bugs-return-471123-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Dec 19 08:13:17 2014
Return-Path: <gcc-bugs-return-471123-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7690 invoked by alias); 19 Dec 2014 08:13:16 -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 7604 invoked by uid 48); 19 Dec 2014 08:13:06 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64357] [5 Regression] ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579
Date: Fri, 19 Dec 2014 08:13: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:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-64357-4-uicR2ElDCh@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64357-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64357-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-12/txt/msg02130.txt.bz2
Content-length: 965

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-19
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |5.0
            Summary|ICE at -Os on               |[5 Regression] ICE at -Os
                   |x86_64-linux-gnu in         |on x86_64-linux-gnu in
                   |check_loop_closed_ssa_use,  |check_loop_closed_ssa_use,
                   |at                          |at
                   |tree-ssa-loop-manip.c:579   |tree-ssa-loop-manip.c:579
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r216304.


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

* [Bug tree-optimization/64357] [5 Regression] ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579
  2014-12-19  7:37 [Bug tree-optimization/64357] New: ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579 su at cs dot ucdavis.edu
@ 2014-12-19 11:48 ` rguenth at gcc dot gnu.org
  2015-01-12 15:35 ` rguenth at gcc dot gnu.org
  2015-01-12 15:40 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-19 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.


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

* [Bug tree-optimization/64357] [5 Regression] ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579
  2014-12-19  7:37 [Bug tree-optimization/64357] New: ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579 su at cs dot ucdavis.edu
  2014-12-19 11:48 ` [Bug tree-optimization/64357] [5 Regression] " rguenth at gcc dot gnu.org
@ 2015-01-12 15:35 ` rguenth at gcc dot gnu.org
  2015-01-12 15:40 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-12 15:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Jan 12 15:34:37 2015
New Revision: 219473

URL: https://gcc.gnu.org/viewcvs?rev=219473&root=gcc&view=rev
Log:
2015-01-12  Richard Biener  <rguenther@suse.de>

    PR middle-end/64357
    * tree-cfg.c (gimple_can_merge_blocks_p): Protect simple
    latches properly.

    * gcc.dg/torture/pr64357.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr64357.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-cfg.c


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

* [Bug tree-optimization/64357] [5 Regression] ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579
  2014-12-19  7:37 [Bug tree-optimization/64357] New: ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579 su at cs dot ucdavis.edu
  2014-12-19 11:48 ` [Bug tree-optimization/64357] [5 Regression] " rguenth at gcc dot gnu.org
  2015-01-12 15:35 ` rguenth at gcc dot gnu.org
@ 2015-01-12 15:40 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-12 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-01-12 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-19  7:37 [Bug tree-optimization/64357] New: ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579 su at cs dot ucdavis.edu
2014-12-19 11:48 ` [Bug tree-optimization/64357] [5 Regression] " rguenth at gcc dot gnu.org
2015-01-12 15:35 ` rguenth at gcc dot gnu.org
2015-01-12 15:40 ` rguenth 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).