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

--- Comment #3 from David Stone <davidfromonline at gmail dot com> ---
Simplified reproduction:

```
auto g(auto fn) {
        return fn();
}

template<typename>
struct base {
        static auto value() {
                return 0;
        }
};

struct S : base<void> {
        static auto f() -> int {
                return g(value);
        }
};
```

See it live: https://godbolt.org/z/18n8M8oG9

An additional workaround is to explicitly take the address of the function in
line 14 of my reproducer: `return g(&value);`.

Reply via email to