http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50025
Ville Voutilainen <ville.voutilainen at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ville.voutilainen at gmail dot com --- Comment #14 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- This bug seems to be fixed with the current trunk. Both the example in the original report and similar examples compile correctly, like std::string& f() {static std::string s; return s;} int main() { std::string& ri{f()}; } and int& f() {static int i = 42; return i;} int main() { int& ri{f()}; } Please close as resolved.