Bug 64050 - [5 Regression] r218009 causes LTO/PGO bootstrap failure: ICE: in inline_small_functions, at ipa-inline.c:1709
Summary: [5 Regression] r218009 causes LTO/PGO bootstrap failure: ICE: in inline_small...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 5.0
: P1 normal
Target Milestone: 5.0
Assignee: Martin Liška
URL:
Keywords:
: 64060 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-24 14:16 UTC by Markus Trippelsdorf
Modified: 2014-11-25 15:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-11-24 00:00:00


Attachments
Suggested patch v1 (2.39 KB, patch)
2014-11-25 10:32 UTC, Martin Liška
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2014-11-24 14:16:13 UTC
Since r218009 I get:

trippels@gcc2-power8 gcc % /home/trippels/gcc_build_dir_/./prev-gcc/xg++ -B/home/trippels/gcc_build_dir_/./prev-gcc/ -B/usr/local/powerpc64-unknown-linux-gnu/bin/ -nostdinc++ -B/home/trippels/gcc_build_dir_/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/home/trippels/gcc_build_dir_/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/trippels/gcc_build_dir_/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/trippels/gcc_build_dir_/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/trippels/gcc/libstdc++-v3/libsupc++ -L/home/trippels/gcc_build_dir_/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/trippels/gcc_build_dir_/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -mcpu=power8 -O3 -pipe -flto=jobserver -frandom-seed=1 -fprofile-use -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc -o build/gengtype build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o build/gengtype-state.o build/version.o .././libiberty/libiberty.a
0x10d0d91f inline_small_functions
        ../../gcc/gcc/ipa-inline.c:1709
0x10d0d91f ipa_inline
        ../../gcc/gcc/ipa-inline.c:2189
0x10d0d91f execute
        ../../gcc/gcc/ipa-inline.c:2558
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.
lto-wrapper: fatal error: /home/trippels/gcc_test/usr/local/bin/g++ returned 1 exit status
compilation terminated.
/home/trippels/bin/ld: fatal error: lto-wrapper failed
Comment 1 Markus Trippelsdorf 2014-11-24 14:52:27 UTC
Breakpoint 1, inline_small_functions () at ../../gcc/gcc/ipa-inline.c:1709
1709          gcc_assert (current_badness >= badness);
(gdb) l
1704          /* When updating the edge costs, we only decrease badness in the keys.
1705             Increases of badness are handled lazilly; when we see key with out
1706             of date value on it, we re-insert it now.  */
1707          current_badness = edge_badness (edge, false);
1708          gcc_assert (cached_badness == current_badness);
1709          gcc_assert (current_badness >= badness);
1710          if (current_badness != badness)
1711            {
1712              edge->aux = edge_heap.insert (current_badness, edge);
1713              continue;
(gdb) p current_badness
$1 = {
  m_sig = 2752610048, 
  m_exp = -8, 
  m_negative = true
}
(gdb) p badness
$2 = {
  m_sig = 2852705280, 
  m_exp = -8, 
  m_negative = true
}

../gcc/configure --disable-libstdcxx-pch --disable-libvtv --disable-libitm --disable-libcilkrts --disable-libssp --disable-libgomp --disable-werror --disable-multilib --enable-languages=c,c++,fortran --with-build-config=bootstrap-lto

make -j160 BOOT_CFLAGS="-mcpu=power8 -O3 -pipe" STAGE1_CFLAGS="-mcpu=power8 -O3 -pipe" CFLAGS_FOR_TARGET="-mcpu=power8 -O3 -pipe" CXXFLAGS_FOR_TARGET="-mcpu=power8 -O3 -pipe" profiledbootstrap
Comment 2 H.J. Lu 2014-11-24 16:09:42 UTC
It also happens on Linux/x86-64:

https://gcc.gnu.org/ml/gcc-regression/2014-11/msg00682.html
Comment 3 Martin Liška 2014-11-25 09:40:36 UTC
*** Bug 64060 has been marked as a duplicate of this bug. ***
Comment 4 Martin Liška 2014-11-25 10:32:43 UTC
Created attachment 34110 [details]
Suggested patch v1
Comment 5 Martin Liška 2014-11-25 15:16:59 UTC
Author: marxin
Date: Tue Nov 25 15:16:27 2014
New Revision: 218048

URL: https://gcc.gnu.org/viewcvs?rev=218048&root=gcc&view=rev
Log:
2014-11-25  Martin Liska  <mliska@suse.cz>

	PR bootstrap/64050
	PR ipa/64060
	* sreal.c (sreal::operator+): Addition fixed.
	(sreal::signedless_plus): Negative numbers are
	handled correctly.
	(sreal::operator-): Subtraction is fixed.
	(sreal::signedless_minus): Negative numbers are
	handled correctly.
	* sreal.h (sreal::operator<): Equal negative numbers
	are compared correctly.
	(sreal::shift): New checking asserts are introduced.
	Operation is fixed.
	* gcc.dg/plugin/plugin.exp: New plugin.
	* gcc.dg/plugin/sreal-test-1.c: New test.
	* gcc.dg/plugin/sreal_plugin.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/plugin/sreal-test-1.c
    trunk/gcc/testsuite/gcc.dg/plugin/sreal_plugin.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sreal.c
    trunk/gcc/sreal.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/plugin/plugin.exp
Comment 6 Martin Liška 2014-11-25 15:52:48 UTC
Resolved.