[Bug c++/109232] Using deduced return type in an unevaluated context leads to codegen

2023-03-22 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232 --- Comment #5 from Patrick Palka --- So one workaround is to explicitly declare begin inline, which works because the problematic test in cgraph_node::finalize_function excludes DECL_DECLARED_INLINE_P functions.

[Bug c++/109232] Using deduced return type in an unevaluated context leads to codegen

2023-03-22 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232 --- Comment #4 from Patrick Palka --- Here's another perhaps simpler version that explicitly gives begin internal linkage, which also fails to link: namespace { template auto begin(T&& r) { return r.begin(); } } struct R {

[Bug c++/109232] Using deduced return type in an unevaluated context leads to codegen

2023-03-22 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org --- Comment

[Bug c++/109232] Using deduced return type in an unevaluated context leads to codegen

2023-03-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232 --- Comment #2 from Andrew Pinski --- clang does not emit the function but does emit the warning ...

[Bug c++/109232] Using deduced return type in an unevaluated context leads to codegen

2023-03-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232 Richard Biener changed: What|Removed |Added Keywords||link-failure --- Comment #1 from