https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93922
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note here is a C++11 testcase which shows the problem and shows it is a
regression:
template<typename T> struct sk_sp {
template<typename U> sk_sp(sk_sp<U> const &);
~sk_sp() {}
};
struct SkPicture {};
struct Wrapped: SkPicture {
Wrapped(SkPicture const &);
};
struct S {
sk_sp<SkPicture const> x;
Wrapped y;
};
sk_sp<SkPicture> ref(SkPicture *);
void f(SkPicture * x, SkPicture const & y) {
new S{ref(x), y};
}