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

            Bug ID: 82957
           Summary: internal compiler error: in to_cgraph_frequency, at
                    profile-count.c:251
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: babokin at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

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.

Reply via email to