C++ PATCH for c++/88196, ICE with class non-type template parameter

Jason Merrill jason@redhat.com
Fri Dec 21 02:51:00 GMT 2018


On 12/20/18 4:54 PM, Marek Polacek wrote:
> This testcase breaks in C++20 because convert_nontype_argument gets a PTRMEM_CST
> as the expression, and we're trying to convert it to a class type, which
> doesn't work, but because of the PTRMEM_CST check below we never diagnosed it.
> 
> The comment says a PTRMEM_CST is a valid template argument for a parameter of
> pointer to member type, but it doesn't check that that's what we're converting
> it to.  Fixed by adding such a check.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?

OK.

Jason



More information about the Gcc-patches mailing list