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

--- Comment #2 from Alfred Agrell <blubban at gmail dot com> ---
struct a { int c; };

template<int=1>
struct ddd {
    int f()
    {
        using a2 = decltype([]<int=2>(int a::*)->a{}(&a::c));
        return []<int=4>(int a2::*){ return 2; }(&a::c);
    }
};

int xs() { return ddd().f(); }


-std=c++20 again


-> <source>:8:16: sorry, unimplemented: mangling offset_ref


https://godbolt.org/z/4M3ToqqPW


Adding a <int=2> to the first lambda changes the error to the same ICE as this
issue (https://godbolt.org/z/Pq9T16GvP), so I'm about 98% sure it's the same
root cause.

Reply via email to