================
@@ -36,6 +37,13 @@ static_assert(b.x == 1 && b.y == 2 && b.z == 3 && b.w == 4);
static_assert(b.r == 1 && b.g == 2 && b.b == 3 && b.a == 4);
static_assert(b[5]); // expected-error {{not an integral constant expression}}
expected-note {{cannot refer to element 5 of array of 4 elements}}
+// GH220256: element access through a past-the-end or null pointer.
+constexpr FourIntsExtVec arr[2] = {{1,2,3,4}, {5,6,7,8}};
+static_assert(arr[2][0]); // expected-error {{not an integral constant
expression}} expected-note {{cannot access vector element of pointer past the
end of object}}
----------------
kodlan wrote:
It does not quite: one uses the vector_size type and the other the
ext_vector_type type
https://github.com/llvm/llvm-project/pull/221820
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits