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

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