https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78750
Bug ID: 78750 Summary: [7 Regression] ICE in get_range_info, at tree-ssanames.c:375 Product: gcc Version: 7.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 r243430 $ cat DateTime.ii template <typename> using b = void; template <typename, typename, template <typename...> class, typename...> struct c { using a = int; }; template <typename aa, template <typename...> class d, typename... e> struct c<aa, b<d<e...>>, d, e...> { using a = d<e...>; }; template <typename aa, template <typename...> class d, typename... e> using f = c<aa, void, d, e...>; template <typename aa, template <typename...> class d, typename... e> using g = typename f<aa, d, e...>::a; template <template <typename...> class aa, template <typename...> class d, typename... e> using h = g<aa<e...>, d, e...>; template <typename, typename> using i = int; class ab { template <typename> struct j { typedef ab k; }; }; struct l { template <typename ac, typename n> using o = typename ac::template j<n>::k; template <typename q> using r = typename q::d; template <typename q> using ae = typename q::f; }; template <typename ac, typename n> using ag = h<i, l::o, ac, n>; struct s : l { using ad = g<char, r>; using af = g<int, ae>; template <typename q> using w = ag<ab, q>; }; struct ah : s { template <typename> struct ak { typedef w<int> k; }; }; int u; class al { public: struct x { x(ah::ad, ab); } ai; template <typename aj> void y(aj, aj); ah::ak<char>::k am(); al(const al &) : ai(0, am()) { int v = ao(); y(u, v); } ab z; al(const char *) : ai(0, z) {} ah::af ao() const; }; extern "C" char *strcpy(char *, const char *); int an(char *, const char *, long); class aq {}; template <class ap> class ar : public aq { public: ar(al, ap as) : m(m) { char t = *strcpy(&t, as); } al m; }; class at { public: template <class ap> at(al aw, ap &as) : p(new ar<ap>(aw, as)) {} aq *p; }; enum au { av }; class ax { public: ax(al); template <class ap> void ay(au, al as, ap &az) { at(as, az); } }; class ba { ba(const al &); }; ax a(""); ba::ba(const al &aw) { if (aw.ao() == 4) { char b[1]; if (an(b, "", 3)) if (an(b, "", 3)) if (an(b, "", 3)) if (an(b, "", 3)) if (an(b, "", 3)) a.ay(av, "", b); } } $ g++ -c -O2 -Wno-deprecated DateTime.ii DateTime.ii: In constructor 'at::at(al, ap&) [with ap = char [1]]': DateTime.ii:56:42: internal compiler error: in get_range_info, at tree-ssanames.c:375 ar(al, ap as) : m(m) { char t = *strcpy(&t, as); } ~~~~~~^~~~~~~~ 0xca7bdf get_range_info(tree_node const*, generic_wide_int<wide_int_storage>*, generic_wide_int<wide_int_storage>*) ../../src/gcc/tree-ssanames.c:375 0x792217 get_size_range ../../src/gcc/builtins.c:3031 0x793855 check_sizes ../../src/gcc/builtins.c:3136 0x79e846 expand_builtin_strcpy ../../src/gcc/builtins.c:3597 0x79e846 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../src/gcc/builtins.c:6694 0x89864b expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../src/gcc/expr.c:10772 0x7b6a94 expand_expr ../../src/gcc/expr.h:276 0x7b6a94 expand_call_stmt ../../src/gcc/cfgexpand.c:2658 0x7b6a94 expand_gimple_stmt_1 ../../src/gcc/cfgexpand.c:3571 0x7b6a94 expand_gimple_stmt ../../src/gcc/cfgexpand.c:3737 0x7b794f expand_gimple_basic_block ../../src/gcc/cfgexpand.c:5744 0x7bcb26 execute ../../src/gcc/cfgexpand.c:6355 Please submit a full bug report, with preprocessed source if appropriate.