ICE caused by list-initializer within template function that contains call of overloads, like following. ``` int id(int v) { return v; } float id(float v) { return v; } template <typename> int foo(int v) { return int{id(v)}; // ICE on here } ``` https://wandbox.org/permlink/XtHobAXA7lQ1jPTy I encountered this issue after upgrade from 8 to 9, so I think it's a 9's regression.
Started with r268321.
https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00919.html
Author: mpolacek Date: Wed Feb 13 21:39:18 2019 New Revision: 268854 URL: https://gcc.gnu.org/viewcvs?rev=268854&root=gcc&view=rev Log: PR c++/89297 - ICE with OVERLOAD in template. * semantics.c (finish_compound_literal): Call instantiate_non_dependent_expr_sfinae. * g++.dg/cpp0x/initlist113.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp0x/initlist113.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog
Fixed.