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

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 ` [Bug tree-optimization/67470] [5 " rguenth at gcc dot gnu.org
2015-09-15 14:10 ` [Bug tree-optimization/67470] [5/6 " rguenth at gcc dot gnu.org
2015-09-21  9:56 ` [Bug tree-optimization/67470] [5 " 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).