https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105734

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jeremy R. from comment #1)
> More minimal: https://godbolt.org/z/WcGab4W8T

>// only fails when this stuff is in a namespace, for some reason

You found that at the same time I did :).

Here is the most reduced testcase changing the names some more:
namespace hh {
    struct nothing {};
    template<typename A = int>
    struct s {
        auto h()  {
            return s<bool>();
        }
    };
}

template <typename T>
void bar() {
        auto m = hh::s( hh::s{}.h());
        m.~s();
}

void foo() { bar<int>(); }

Reply via email to