https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85214
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Status|UNCONFIRMED |NEW Last reconfirmed| |2018-04-06 CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org Target Milestone|--- |7.4 Summary|ICE on valid C++17 code on |[7/8 Regression] ICE on |x86_64-linux-gnu: in |valid C++17 code on |tsubst_copy, at |x86_64-linux-gnu: in |cp/pt.c:14562 |tsubst_copy, at | |cp/pt.c:14562 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase: typedef int a; namespace b { template <typename c, c d> struct e { static constexpr c f = d; constexpr operator int() { return f; } }; typedef e<bool, false> g; template <typename, typename> struct h : g {}; template <typename...> class k; template <typename c, typename l> constexpr bool m = h<c, l>::f; template <a> struct n; template <typename> struct aa; template <long, typename> struct C; template <long ab, typename c> using o = typename C<ab, c>::q; template <typename c, c> struct p {}; template <typename, typename = n<0>> struct F; template <typename c, a... r> struct F<c, n<r...>> { typedef p<c, r...> ae; }; template <typename c, c> using t = typename F<c>::ae; template <a... r> using w = p<a, r...>; template <a ad> using af = t<a, ad>; template <typename... ag> struct aa<k<ag...>> : e<long, sizeof...(ag)> {}; template <typename c> constexpr a ah = aa<c>::f; template <typename ai, typename... aj> struct C<0, k<ai, aj...>> { typedef ai q; }; } template <typename ak, a... s> void al(ak am, b::w<s...>) { int{(am(b::e<a, s>{}), 0)...}; } template <int an, typename ak> void al(ak am) { al(am, b::af<an>()); } void ao() { using ap = b::k<double>; const a aq = b::ah<ap>; al<aq>([](auto i) { using ar = b::o<i, ap>; al<aq>([](auto j) { using as = b::o<j, ap>; if constexpr (b::m<ar, as>) ; }); }); } Started to ICE with r239338 when if constexpr has been introduced.