Bug 82957 - [8 Regression] ICE: in to_cgraph_frequency, at profile-count.c:251
Summary: [8 Regression] ICE: in to_cgraph_frequency, at profile-count.c:251
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: 8.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-12 21:53 UTC by Dmitry Babokin
Modified: 2017-11-19 15:46 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-11-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Babokin 2017-11-12 21:53:24 UTC
Building compiler-rt (LLVM libs) with GCC trunk (rev 254666, x86_64) I get this error.

Here's reduced test case:

> cat cfi.i
namespace a {
typedef long b;
void c() { __builtin_trap(); }
}
using namespace a;
namespace d {
class e {
public:
  bool f();
};
__attribute__((always_inline)) void g(b, void *, void *) {
  e h;
  if (h.f())
    c();
}
}
using namespace d;
void i() { g(0, 0, 0); }
sctpiel1:/users/dybaboki/llvm/build-trunk-20171112_temp/projects/compiler-rt/lib/cfi> g++ -std=c++11 -O2 cfi.i -c -m32
cfi.i:11:37: warning: always_inline function might not be inlinable [-Wattributes]
 __attribute__((always_inline)) void g(b, void *, void *) {
                                     ^
during GIMPLE pass: einline
cfi.i: In function ‘void i()’:
cfi.i:18:24: internal compiler error: in to_cgraph_frequency, at profile-count.c:251
 void i() { g(0, 0, 0); }
                        ^
0xde7859 profile_count::to_cgraph_frequency(profile_count) const
	../../gcc/gcc/profile-count.c:251
0xcb2cd7 cgraph_edge::frequency()
	../../gcc/gcc/cgraph.h:3118
0xcb2cd7 estimate_edge_size_and_time
	../../gcc/gcc/ipa-fnsummary.c:2581
0xcb2cd7 estimate_calls_size_and_time
	../../gcc/gcc/ipa-fnsummary.c:2620
0xcb2ed6 estimate_calls_size_and_time
	../../gcc/gcc/ipa-fnsummary.c:2627
0xcb3625 ipa_update_overall_fn_summary(cgraph_node*)
	../../gcc/gcc/ipa-fnsummary.c:3114
0x6fb64e early_inline_small_functions
	../../gcc/gcc/ipa-inline.c:2636
0x6fb64e early_inliner(function*)
	../../gcc/gcc/ipa-inline.c:2730
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Comment 1 Markus Trippelsdorf 2017-11-13 08:28:57 UTC
Probably started with r254379.
Comment 2 Jan Hubicka 2017-11-19 15:46:53 UTC
Fixed yesterday.