public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
@ 2015-09-06 21:33 su at cs dot ucdavis.edu
  2015-09-07  9:44 ` [Bug tree-optimization/67470] [5/6 Regression] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-09-06 21:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67470
           Summary: ICE at -O3 on x86_64-linux-gnu in
                    compute_live_loop_exits, at tree-ssa-loop-manip.c:235
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk (as
well as 5.1.x and 5.2.x) at -O3 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-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-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 6.0.0 20150906 (experimental) [trunk revision 227511] (GCC) 
$ 
$ gcc-trunk -O2 small.c; ./a.out
$ gcc-4.9 -O3 small.c; ./a.out
$ 
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:6:1: internal compiler error: in compute_live_loop_exits, at
tree-ssa-loop-manip.c:235
 main ()
 ^
0xc070b7 compute_live_loop_exits
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:235
0xc070b7 add_exit_phis_var
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:322
0xc070b7 add_exit_phis
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:344
0xc070b7 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int, loop*)
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:664
0xbeabb4 move_computations
        ../../gcc-trunk/gcc/tree-ssa-loop-im.c:1326
0xbeabb4 tree_ssa_lim()
        ../../gcc-trunk/gcc/tree-ssa-loop-im.c:2551
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;

void __assert_fail ();

int
main ()
{
  int f, *g, **h = &g;
  for (; b;)
    {
      c = &a;
      for (e = 0; e < 1; e++)
        *h = 0;
      for (; d; d++)
        if (f)
          *c = 0;
        else
          {
            *c = e = 0;
            *h = &a;
          }

      if (a && !g)
        __assert_fail ();

    }
  return 0;
}
>From gcc-bugs-return-496480-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Sep 07 01:35:32 2015
Return-Path: <gcc-bugs-return-496480-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 42073 invoked by alias); 7 Sep 2015 01:35:32 -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 42015 invoked by uid 48); 7 Sep 2015 01:35:28 -0000
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67469] "-pie -fpie" result in BSS instead of undefined symbols
Date: Mon, 07 Sep 2015 01:35: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: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hjl.tools at gmail dot com
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:
Message-ID: <bug-67469-4-FiIzkYiNmw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67469-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67469-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-09/txt/msg00458.txt.bz2
Content-length: 346

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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
It was done on purpose by:

commit 130f233477ed03a7bdffb832e7eb9f0a366e0d6b
Author: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Dec 4 19:40:50 2014 +0000

    x86-64: Optimize access to globals in PIE with copy reloc


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

* [Bug tree-optimization/67470] [5/6 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
@ 2015-09-07  9:44 ` mpolacek at gcc dot gnu.org
  2015-09-07 11:08 ` mpolacek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-09-07  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-07
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |5.3
            Summary|ICE at -O3 on               |[5/6 Regression] ICE at -O3
                   |x86_64-linux-gnu in         |on x86_64-linux-gnu in
                   |compute_live_loop_exits, at |compute_live_loop_exits, at
                   |tree-ssa-loop-manip.c:235   |tree-ssa-loop-manip.c:235
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.  Started with r212034 (interesting).


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

* [Bug tree-optimization/67470] [5/6 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
  2015-09-07  9:44 ` [Bug tree-optimization/67470] [5/6 Regression] " mpolacek at gcc dot gnu.org
@ 2015-09-07 11:08 ` mpolacek at gcc dot gnu.org
  2015-09-08 13:06 ` jamborm at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-09-07 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Does not ICE with -Ofast.


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

* [Bug tree-optimization/67470] [5/6 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
  2015-09-07  9:44 ` [Bug tree-optimization/67470] [5/6 Regression] " mpolacek at gcc dot gnu.org
  2015-09-07 11:08 ` mpolacek at gcc dot gnu.org
@ 2015-09-08 13:06 ` jamborm at gcc dot gnu.org
  2015-09-08 13:11 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu.org @ 2015-09-08 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> Confirmed.  Started with r212034 (interesting).

Even the revision before that ICEs with --param allow-store-data-races=0


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

* [Bug tree-optimization/67470] [5/6 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2015-09-08 13:06 ` jamborm at gcc dot gnu.org
@ 2015-09-08 13:11 ` mpolacek at gcc dot gnu.org
  2015-09-14 11:11 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-09-08 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
With --param allow-store-data-races=0 the ICE started with r211625.


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

* [Bug tree-optimization/67470] [5/6 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2015-09-08 13:11 ` mpolacek at gcc dot gnu.org
@ 2015-09-14 11:11 ` rguenth at gcc dot gnu.org
  2015-09-15 14:10 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-14 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll have a look.


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

* [Bug tree-optimization/67470] [5 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
                   ` (5 preceding siblings ...)
  2015-09-15 14:10 ` rguenth at gcc dot gnu.org
@ 2015-09-15 14:10 ` rguenth at gcc dot gnu.org
  2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-15 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |6.0
            Summary|[5/6 Regression] ICE at -O3 |[5 Regression] ICE at -O3
                   |on x86_64-linux-gnu in      |on x86_64-linux-gnu in
                   |compute_live_loop_exits, at |compute_live_loop_exits, at
                   |tree-ssa-loop-manip.c:235   |tree-ssa-loop-manip.c:235

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.


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

* [Bug tree-optimization/67470] [5/6 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
                   ` (4 preceding siblings ...)
  2015-09-14 11:11 ` rguenth at gcc dot gnu.org
@ 2015-09-15 14:10 ` rguenth at gcc dot gnu.org
  2015-09-15 14:10 ` [Bug tree-optimization/67470] [5 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-15 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Sep 15 14:10:10 2015
New Revision: 227797

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

        PR tree-optimization/67470
        * tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
        structure for PHI hoisting by inserting a forwarder block
        if appropriate.

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

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr67470.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-loop-im.c


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

* [Bug tree-optimization/67470] [5 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
                   ` (7 preceding siblings ...)
  2015-09-21  9:56 ` rguenth at gcc dot gnu.org
@ 2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Sep 21 09:55:57 2015
New Revision: 227961

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

        Backport from mainline
        2015-07-08  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66793
        * gimple-ssa-isolate-paths.c
(insert_trap_and_remove_trailing_statemen):
        Properly split the block after stmts ending it.

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

        2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67055
        * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Handle
        NULL gimple_block.

        * g++.dg/torture/pr67055.C: New testcase.

        2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67121
        * tree-if-conv.c (combine_blocks): Clear range-info produced
        by stmts no longer executed conditionally.

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

        2015-09-16  Richard Biener  <rguenther@suse.de>

        PR middle-end/67271
        * fold-const.c (native_encode_expr): Bail out on bogus offsets.

        * gcc.dg/pr67271.c: New testcase.

        2015-07-22  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66952
        * tree-ssa-ifcombine.c (pass_tree_ifcombine::execute): For
        blocks we end up executing unconditionally reset all SSA
        info such as range and alignment.
        * tree-ssanames.h (reset_flow_sensitive_info): Declare.
        * tree-ssanames.c (reset_flow_sensitive_info): New function.

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

        2015-09-15  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67470
        * tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
        structure for PHI hoisting by inserting a forwarder block
        if appropriate.

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

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr67055.C
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr67271.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66793.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66952.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr67121.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr67470.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/fold-const.c
    branches/gcc-5-branch/gcc/gimple-ssa-isolate-paths.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-if-conv.c
    branches/gcc-5-branch/gcc/tree-ssa-ccp.c
    branches/gcc-5-branch/gcc/tree-ssa-ifcombine.c
    branches/gcc-5-branch/gcc/tree-ssa-loop-im.c
    branches/gcc-5-branch/gcc/tree-ssanames.c
    branches/gcc-5-branch/gcc/tree-ssanames.h


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

* [Bug tree-optimization/67470] [5 Regression] ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235
  2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
                   ` (6 preceding siblings ...)
  2015-09-15 14:10 ` [Bug tree-optimization/67470] [5 " rguenth at gcc dot gnu.org
@ 2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  2015-09-21  9:56 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|                            |5.2.0

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


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

end of thread, other threads:[~2015-09-21  9:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-06 21:33 [Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235 su at cs dot ucdavis.edu
2015-09-07  9:44 ` [Bug tree-optimization/67470] [5/6 Regression] " mpolacek at gcc dot gnu.org
2015-09-07 11:08 ` mpolacek at gcc dot gnu.org
2015-09-08 13:06 ` jamborm at gcc dot gnu.org
2015-09-08 13:11 ` mpolacek at gcc dot gnu.org
2015-09-14 11:11 ` rguenth at gcc dot gnu.org
2015-09-15 14:10 ` rguenth at gcc dot gnu.org
2015-09-15 14:10 ` [Bug tree-optimization/67470] [5 " rguenth at gcc dot gnu.org
2015-09-21  9:56 ` rguenth at gcc dot gnu.org
2015-09-21  9:56 ` 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).