https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83724
Bug ID: 83724 Summary: [8 Regression] ICE in calc_dfs_tree, at dominance.c:458 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 llvm-toolchain-3.9 (3.9.1) on x86_64-linux-gnu $ g++ -c -std=c++11 -O2 -fno-exceptions MipsAsmParser.ii during GIMPLE pass: profile_estimate : In function 'unsigned int {anonymous}::G::bi(const at&, l&)': :64:1: internal compiler error: in calc_dfs_tree, at dominance.c:458 0x5a1d99 calc_dfs_tree ../../src/gcc/dominance.c:458 0x8fd59d calculate_dominance_info(cdi_direction) ../../src/gcc/dominance.c:734 0xaa959a loop_optimizer_init(unsigned int) ../../src/gcc/loop-init.c:103 0xb4b626 execute ../../src/gcc/predict.c:3821 Please submit a full bug report, with preprocessed source if appropriate. $ cat MipsAsmParser.ii # 1 "" 3 namespace a { template <typename b, b c> struct d { static constexpr b e = c; }; template <typename> struct f : d<bool, __is_trivially_copyable(int)> {}; } typedef long g; template <typename> struct h { static const bool e = a::f<int>::e; }; namespace a { template <typename> struct ah; template <typename> class ai; } class i { public: operator[](long) const {} }; template <typename, int> class am : public i {}; class an; class k : public am<a::ai<an>, h<a::ai<a::ah<an>>>::e> {}; class l { public: aq(); }; class ar extern as; typedef k at; class m { virtual bool av(int, unsigned &, at &, int &, g &, bool); }; class ar { public: typedef m *aw(const &, int &, const &, const &); }; struct ax { static ay(ar::aw); }; template <class az> struct n { n(ar) { ax::ay(ba); } static m *ba(const &bb, int &bc, const &bd, const &be) { az(bb, bc, bd, be); } }; namespace { class G : m { unsigned bi(const at &, l &); bool av(int, unsigned &, at &, int &, g &, bool); public: G(const, int, const, const) {} }; } bool G::av(int, unsigned &, at &bl, int &, g &, bool) { l bo; bi(bl, bo); } o() { n<G> bp(as); } namespace { enum { bq, br }; } unsigned G::bi(const at &bl, l &bo) { unsigned bs; for (char *j;; j += 2) switch (*j) { case bq: bl[bs]; case br: bo.aq(); } }