https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71662
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paolo.carlini at oracle dot com --- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> --- This seems fixed in trunk, we simply reject the code without ICEing. While reviewing this bug I noticed once more the nit that -Wreturn-type enabled by default means that in such cases we emit a redundant warning: 71662.C:14:10: error: āeā was not declared in this scope return e; ^ 71662.C: In instantiation of āA<T>::E A<T>::h() [with T = int]ā: 71662.C:8:23: required from here 71662.C:15:1: warning: no return statement in function returning non-void [-Wreturn-type] but that seems an unrelated issue, really. Thus I mean to commit the testcase and remove the 8 Regression marker.