https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51392
--- Comment #4 from cyp561 at gmail dot com --- Is there any case in which a function returning a structure may not elide the return value copy to being passed by invisible reference? If not, I think it is either a bug that the code fails, or a bug that the C++ frontend allows __attribute__((__const__)) on any function which returns a structure. It seems strange to me that __attribute__((__const__)) doesn't work in cases where constexpr does work, since I thought constexpr is a now-standard version of __attribute__((__const__)).