Debian Codegraph @

gcc/testsuite/g++.dg/torture/vector-subaccess-1.C

raw
1 /* PR c++/89224 */
2 /* { dg-additional-options "-Wno-psabi" } */
3
4 /* The access of `vector[i]` has the same qualifiers as the original
5 vector which was missing. */
6
7 typedef __attribute__((vector_size(16))) unsigned char Int8x8_t;
8
9 template <class T>
10 void g(T &x) {
11 __builtin_abort();
12 }
13 template <class T>
14 void g(const T &x) {
15 __builtin_exit(0);
16 }
17 void f(const Int8x8_t x) {
18 g(x[0]);
19 }
20 int main(void)
21 {
22 Int8x8_t x ={};
23 f(x);
24 }