https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82032
Bug ID: 82032 Summary: [8 Regression] ICE in try_switch_expansion, at tree-switch-conversion.c:2063 Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Mine issue on: $ cat ice.ii template <typename a> class b { public: typename a::aa operator[] (typename a::c) {} }; class d { public: typedef long c; typedef int aa; }; struct e { int af[4]; int ag; }; b<d> f; bool g (e &i) { for (int h; h; ++h) switch (f[h]) { case 'x': case 'a': i.af[h] = 3; break; default: return false; } } $ g++ ice.ii -O3 during GIMPLE pass: switchlower ice.ii: In function ‘bool g(e&)’: ice.ii:19:1: internal compiler error: in try_switch_expansion, at tree-switch-conversion.c:2063 g (e &i) ^ 0x61a3e0 try_switch_expansion .././../gcc/tree-switch-conversion.c:2063 0xc90a66 execute .././../gcc/tree-switch-conversion.c:2215