https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84196
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Known to work| |4.7.4 Summary|invalid instantiation of a |[6/7/8 Regression] invalid |function template on a |call to a function template |vector type silently |with a vector argument |accepted |silently accepted Known to fail| |4.8.4, 4.9.4, 5.5.0, 6.4.0, | |7.2.0, 8.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Bisection suggests this is regression introduced by r186994 in GCC 4.8. Prior to that, GCC rejected the test case with the following errors: pr84196.C: In instantiation of ‘int f(T) [with T = int]’: pr84196.C:9:21: required from here pr84196.C:4:34: error: subscripted value is neither array nor pointer return v[0] + v[1] + v[2] + v[3]; ^ pr84196.C:4:34: error: subscripted value is neither array nor pointer return v[0] + v[1] + v[2] + v[3]; ^ pr84196.C:4:34: error: subscripted value is neither array nor pointer return v[0] + v[1] + v[2] + v[3]; ^ pr84196.C:4:34: error: subscripted value is neither array nor pointer return v[0] + v[1] + v[2] + v[3]; ^ pr84196.C: In function ‘int f(T) [with T = int]’: pr84196.C:5:1: warning: control reaches end of non-void function [-Wreturn-type] } ^