[Bug debug/93951] ICE with '-flto -g -femit-struct-debug-baseonly'

guillaume at morinfr dot org gcc-bugzilla@gcc.gnu.org
Fri Feb 28 14:03:00 GMT 2020


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

--- Comment #2 from Guillaume Morin <guillaume at morinfr dot org> ---
fwiw the reproducer can be reduced further to:

#include <variant>

struct S1 {
    bool fct() const;
};

struct V {
    bool visit() const {
        auto visitor = [](auto&& s) -> bool { return s.fct(); };
        return std::visit(visitor, v);
    }

    std::variant<S1> v;
};


More information about the Gcc-bugs mailing list