================
@@ -339,3 +339,57 @@ int f5(unsigned long len) {
// OGCG: %[[STACK_RESTORE_PTR:.*]] = load ptr, ptr %[[SAVED_STACK]]
// OGCG: call void @llvm.stackrestore.p0(ptr %[[STACK_RESTORE_PTR]])
// OGCG: ret i32 %[[ARR_VAL]]
+
+void vla_subscript_expr() {
+ int **a;
+ unsigned long n = 5;
+ (int (**)[n]){&a}[0][1][5] = 0;
----------------
andykaylor wrote:
This is an odd choice for the test. Where did this come from?
I was expecting something more like this:
```
int f0(int x) {
int vla[x];
return vla[x-1];
}
```
Having a multi-dimension array test is good, but I don't understand the reason
for the arbitrary cast expression.
https://github.com/llvm/llvm-project/pull/175370
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits