https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89224
Bug ID: 89224 Summary: subscript of NEON intrinsic discards const Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: kretz at kde dot org Target Milestone: --- Test case (cf. https://godbolt.org/z/RFrftn): #include <arm_neon.h> template <class T> void g(T &&x) { x = 1; } auto f(const __Int8x8_t &x) { g(x[0]); //x[0] = 1; // ill-formed } decltype(x[0]) is `signed char&`, which can't be right if decltype(x) is const-ref.