public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
@ 2015-01-11  6:06 su at cs dot ucdavis.edu
  2015-01-11 16:04 ` [Bug ipa/64559] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-01-11  6:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64559
           Summary: ICE at -Os on x86_64-linux-gnu in
                    remove_unreachable_nodes, at ipa.c:582
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          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 only on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It is a regression from 4.9.x.

It seems to be the same as PR 64068, but -fno-ipa-icf does not make this ICE
disappear. 

$ 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 20150110 (experimental) [trunk revision 219421] (GCC) 

$ 
$ gcc-trunk -O1 small.c; a.out
$ gcc-4.9 -Os small.c; a.out
$ 
$ gcc-trunk -Os -fno-ipa-icf small.c
small.c:36:1: internal compiler error: in remove_unreachable_nodes, at
ipa.c:582
 }
 ^
0x91228d symbol_table::remove_unreachable_nodes(_IO_FILE*)
    ../../gcc-trunk/gcc/ipa.c:582
0x110910b ipa_inline
    ../../gcc-trunk/gcc/ipa-inline.c:2198
0x110910b execute
    ../../gcc-trunk/gcc/ipa-inline.c:2564
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.
$ 
$ gcc-trunk -Os small.c
small.c:36:1: internal compiler error: in remove_unreachable_nodes, at
ipa.c:582
 }
 ^
0x91228d symbol_table::remove_unreachable_nodes(_IO_FILE*)
    ../../gcc-trunk/gcc/ipa.c:582
0x110910b ipa_inline
    ../../gcc-trunk/gcc/ipa-inline.c:2198
0x110910b execute
    ../../gcc-trunk/gcc/ipa-inline.c:2564
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;

struct S
{
  int f0;
};

static int
fn1 (int p)
{
  return p == 0 || a;
}

static int
fn2 ()
{
  d = fn1 (c);
  return 0;
}

static int
fn3 (struct S p)
{
  p.f0 || fn2 ();
  if (fn1 (1))
    b = 0;
  return 0;
}

int
main ()
{
  struct S e = { 1 };
  fn3 (e);
  return 0;
}


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

* [Bug ipa/64559] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
@ 2015-01-11 16:04 ` jakub at gcc dot gnu.org
  2015-01-12  9:36 ` [Bug ipa/64559] [5 Regression] " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-11 16:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-01-11
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

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


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
  2015-01-11 16:04 ` [Bug ipa/64559] " jakub at gcc dot gnu.org
@ 2015-01-12  9:36 ` rguenth at gcc dot gnu.org
  2015-01-15  4:27 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-12  9:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
            Summary|ICE at -Os on               |[5 Regression] ICE at -Os
                   |x86_64-linux-gnu in         |on x86_64-linux-gnu in
                   |remove_unreachable_nodes,   |remove_unreachable_nodes,
                   |at ipa.c:582                |at ipa.c:582


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
  2015-01-11 16:04 ` [Bug ipa/64559] " jakub at gcc dot gnu.org
  2015-01-12  9:36 ` [Bug ipa/64559] [5 Regression] " rguenth at gcc dot gnu.org
@ 2015-01-15  4:27 ` hubicka at gcc dot gnu.org
  2015-01-15  4:47 ` su at cs dot ucdavis.edu
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-01-15  4:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Seems to be fixed by same patch as PR64068

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


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2015-01-15  4:27 ` hubicka at gcc dot gnu.org
@ 2015-01-15  4:47 ` su at cs dot ucdavis.edu
  2015-01-15 17:30 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-01-15  4:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Jan Hubicka from comment #2)
> Seems to be fixed by same patch as PR64068
> 
> *** This bug has been marked as a duplicate of bug 64068 ***

Jan, strictly speaking, this cannot be a duplicate of PR 64068 as they were
introduced by different revisions (r219108 for this one, and r217973 for PR
64068).


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2015-01-15  4:47 ` su at cs dot ucdavis.edu
@ 2015-01-15 17:30 ` marxin at gcc dot gnu.org
  2015-02-04 23:37 ` doko at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2015-01-15 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Author: marxin
Date: Thu Jan 15 17:29:23 2015
New Revision: 219672

URL: https://gcc.gnu.org/viewcvs?rev=219672&root=gcc&view=rev
Log:
Fix for PR64068 and PR64559.

    * g++.dg/ipa/pr64068.C: New test.
    * gcc.dg/ipa/PR64559.c: New test.
    PR ipa/64068
    PR ipa/64559
    * ipa.c (symbol_table::remove_unreachable_nodes):
    Do not put abstract origins into boundary.



Added:
    trunk/gcc/testsuite/g++.dg/ipa/pr64068.C
    trunk/gcc/testsuite/gcc.dg/ipa/PR64559.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa.c
    trunk/gcc/testsuite/ChangeLog
>From gcc-bugs-return-473380-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 15 17:30:34 2015
Return-Path: <gcc-bugs-return-473380-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8646 invoked by alias); 15 Jan 2015 17:30:33 -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 8205 invoked by uid 48); 15 Jan 2015 17:30:27 -0000
From: "dgilbert at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/64614] bogus used initialized warning (in gcc 4.9.2); switch statement versus &
Date: Thu, 15 Jan 2015 17:30:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dgilbert at redhat 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: short_desc
Message-ID: <bug-64614-4-SHAKGvExgJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64614-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64614-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-01/txt/msg01374.txt.bz2
Content-length: 751

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

Dr. David Alan Gilbert <dgilbert at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|bogus used initialized      |bogus used initialized
                   |warning (in gcc 4.9.2 not   |warning (in gcc 4.9.2);
                   |in 4.8.3); switch statement |switch statement versus &
                   |versus &                    |

--- Comment #4 from Dr. David Alan Gilbert <dgilbert at redhat dot com> ---
Apologies, yes, you're right, it does also do it on 4.8.3.
Sorry again, I think I probably missed either the -O or -Wall when I tried to
reproduce on 4.8.3.


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
                   ` (4 preceding siblings ...)
  2015-01-15 17:30 ` marxin at gcc dot gnu.org
@ 2015-02-04 23:37 ` doko at gcc dot gnu.org
  2015-02-05  0:28 ` wmi at gcc dot gnu.org
  2015-02-19  0:44 ` ctice at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: doko at gcc dot gnu.org @ 2015-02-04 23:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Matthias Klose <doko at gcc dot gnu.org> ---
Author: doko
Date: Wed Feb  4 23:36:22 2015
New Revision: 220426

URL: https://gcc.gnu.org/viewcvs?rev=220426&root=gcc&view=rev
Log:
2015-02-04  Matthias Klose  <doko@ubuntu.com>

        PR target/64938
        Backport from mainline
        2015-01-15  Jan Hubicka  <hubicka@ucw.cz>

        PR ipa/64068
        PR ipa/64559
        * ipa.c (symbol_table::remove_unreachable_nodes):
        Do not put abstract origins into boundary.

2015-02-04  Matthias Klose  <doko@ubuntu.com>

        Backport from mainline
        2015-01-15  Martin Liska  <mliska@suse.cz>

        * g++.dg/ipa/pr64068.C: New test.
        * gcc.dg/ipa/PR64559.c: New test.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/ipa/pr64068.C
    branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/ipa/PR64559.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/ipa.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
                   ` (5 preceding siblings ...)
  2015-02-04 23:37 ` doko at gcc dot gnu.org
@ 2015-02-05  0:28 ` wmi at gcc dot gnu.org
  2015-02-19  0:44 ` ctice at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: wmi at gcc dot gnu.org @ 2015-02-05  0:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from wmi at gcc dot gnu.org ---
Author: wmi
Date: Thu Feb  5 00:27:54 2015
New Revision: 220431

URL: https://gcc.gnu.org/viewcvs?rev=220431&root=gcc&view=rev
Log:
Backport from gcc-4_9-branch.
2015-02-04  Matthias Klose  <doko@ubuntu.com>

        PR target/64938
        Backport from mainline
        2015-01-15  Jan Hubicka  <hubicka@ucw.cz>

        PR ipa/64068
        PR ipa/64559
        * ipa.c (symbol_table::remove_unreachable_nodes):
        Do not put abstract origins into boundary.

Added:
    branches/google/gcc-4_9/gcc/testsuite/g++.dg/ipa/pr64068.C
    branches/google/gcc-4_9/gcc/testsuite/gcc.dg/ipa/PR64559.c
Modified:
    branches/google/gcc-4_9/gcc/ipa.c


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

* [Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582
  2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
                   ` (6 preceding siblings ...)
  2015-02-05  0:28 ` wmi at gcc dot gnu.org
@ 2015-02-19  0:44 ` ctice at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ctice at gcc dot gnu.org @ 2015-02-19  0:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from ctice at gcc dot gnu.org ---
Author: ctice
Date: Thu Feb 19 00:43:33 2015
New Revision: 220805

URL: https://gcc.gnu.org/viewcvs?rev=220805&root=gcc&view=rev
Log:
Backport patch from Google 4.9 branch (r220431):

r220431 | wmi | 2015-02-04 16:27:54 -0800 (Wed, 04 Feb 2015) | 12 lines

Backport from gcc-4_9-branch.
2015-02-04  Matthias Klose  <doko@ubuntu.com>

        PR target/64938
        Backport from mainline
        2015-01-15  Jan Hubicka  <hubicka@ucw.cz>

        PR ipa/64068
        PR ipa/64559
        * ipa.c (symbol_table::remove_unreachable_nodes):
        Do not put abstract origins into boundary.


Added:
    branches/google/gcc-4_9-mobile/gcc/testsuite/g++.dg/ipa/pr64068.C
    branches/google/gcc-4_9-mobile/gcc/testsuite/gcc.dg/ipa/PR64559.c
Modified:
    branches/google/gcc-4_9-mobile/gcc/ipa.c


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

end of thread, other threads:[~2015-02-19  0:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-11  6:06 [Bug ipa/64559] New: ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582 su at cs dot ucdavis.edu
2015-01-11 16:04 ` [Bug ipa/64559] " jakub at gcc dot gnu.org
2015-01-12  9:36 ` [Bug ipa/64559] [5 Regression] " rguenth at gcc dot gnu.org
2015-01-15  4:27 ` hubicka at gcc dot gnu.org
2015-01-15  4:47 ` su at cs dot ucdavis.edu
2015-01-15 17:30 ` marxin at gcc dot gnu.org
2015-02-04 23:37 ` doko at gcc dot gnu.org
2015-02-05  0:28 ` wmi at gcc dot gnu.org
2015-02-19  0:44 ` ctice 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).