tree expr_type = TREE_TYPE (expr);
gcc_assert (!same_type_p (type, expr_type));
+ /* A function pointer conversion also counts as a Qualification Adjustment
+ under [over.ics.scs]. */
+ if (fnptr_conv_p (type, expr_type))
+ return true;
+
if (TYPE_PTR_P (type) && TYPE_PTR_P (expr_type))
return comp_ptr_ttypes (TREE_TYPE (type), TREE_TYPE (expr_type));
else if (TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (expr_type))
--- /dev/null
+// PR c++/90664
+// { dg-do compile { target c++11 } }
+
+template <typename TT, typename MFP, MFP> struct OpM;
+
+template <typename TR, typename TT, TR (TT::*f)()>
+struct OpM<TT, TR (TT::*)(), f>
+{};
+
+class Class {
+public:
+ int address() noexcept { return 0; }
+ void address(int) noexcept {}
+};
+
+struct Sk {
+ template <class C, typename R> Sk(R (C::*p)()) {
+ typedef OpM<C, R (C::*)() /* noexcept */, &Class::address> OP;
+ }
+};
+
+Sk sk(static_cast<int (Class::*)()>(&Class::address));