https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89212
Bug ID: 89212
Summary: [8 regression] ICE in fold_convert_loc at
fold-const.c:2552
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: miklos.puspan at gmail dot com
Target Milestone: ---
compiling the following snippet with -std=c++14, from 8.0 - 8.1 - 8.2 - trunk
causes ICE (between 4.9 - 7.4 it worked fine)
(it conditionally creates a ctor when the class template parameter (member
function pointer non-type) is defaulted to nullptr.)
#include <type_traits>
template<class X, void(X::*foo)() = nullptr>
struct p
{
template<void(X::*fun)() = foo, typename T = std::enable_if_t<nullptr ==
fun, int>>
p(T) { }
p() = default;
};
struct A
{
p<A> i = 1;
void bar();
p<A, &A::bar> j;
};
i have seen several simmilar possible duplicates, but with very different
snippets, e.g. #88976 , but i am not sure.