https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83718
Bug ID: 83718 Summary: [8 Regression] ICE: Floating point exception in profile_count::apply_scale Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org Target Milestone: --- seen with r256272, building slic3r on amd64: $ g++ -c -O2 Print.ii during GIMPLE pass: fnsplit Print.ii: In function 'virtual int*<unnamed class>::d(a, bool)': Print.ii:138:4: internal compiler error: Floating point exception } b; ^ 0xbe45bf crash_signal ../../src/gcc/toplev.c:325 0xc2f89f profile_count::apply_scale(profile_count, profile_count) const ../../src/gcc/profile-count.h:76 0xc2f89f copy_edges_for_bb ../../src/gcc/tree-inline.c:2231 0xc2f89f copy_cfg_body ../../src/gcc/tree-inline.c:2752 0xc2f89f copy_body ../../src/gcc/tree-inline.c:2971 0xc32fc1 tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, bool, bitmap_head*, bool, bitmap_head*, basic_block_def*) ../../src/gcc/tree-inline.c:6039 0x8cf109 cgraph_node::create_version_clone_with_body(vec<cgraph_edge*, va_heap, vl_ptr>, vec<ipa_replace_map*, va_gc, vl_embed>*, bitmap_head*, bool, bitmap_head*, basic_block_def*, char const*) ../../src/gcc/cgraphclones.c:984 0x1251619 split_function ../../src/gcc/ipa-split.c:1369 0x1251619 execute_split_functions ../../src/gcc/ipa-split.c:1896 Please submit a full bug report, with preprocessed source if appropriate. $ cat Print.ii class a { public: int c(const char *); }; class B { virtual int *d(a, bool); }; bool e, f, g, h, i, j, k, l, m, n, o, p, aa, q, r, s, t, u, v, ab, w, x, y, z, ac, ad; class : B { int ae; int af; int ag; int ah; int ai; int aj; int ak; int al; int am; int an; int ao; int ap; int aq; int ar; int as; int at; int au; int av; int aw; int ax; int ay; int az; int ba; int bb; int bc; int bd; int be; int bf; int bg; int bh; int bi; int *d(a, bool) { if (e) return &ae; a bj; bj.c(""); if (f) return ⁡ bj.c(""); if (e) return &ag; bj.c(""); if (f) return &ah; bj.c(""); if (e) return &ai; bj.c(""); if (ad) return &aj; bj.c(""); if (ac) return &ak; bj.c(""); if (z) return &al; bj.c(""); if (y) return &am; bj.c(""); if (x) return &an; bj.c(""); if (w) return &ao; bj.c(""); if (ab) return ≈ bj.c(""); if (v) return &aq; bj.c(""); if (u) return &ar; bj.c(""); if (t) return &as; bj.c(""); if (s) return &at; bj.c(""); if (r) return &au; bj.c(""); if (q) return &av; bj.c(""); if (aa) return &aw; bj.c(""); if (p) return &ax; bj.c(""); if (o) return &ay; bj.c(""); if (n) return &az; bj.c(""); if (m) return &ba; bj.c(""); if (l) return &bb; bj.c(""); if (k) return &bc; bj.c(""); if (j) return &bd; bj.c(""); if (i) return &be; bj.c(""); if (h) return &bf; bj.c(""); if (g) return &bg; if (f) return &bh; { a bj; e = bj.c(""); } return &bi; } } b;