================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir
-verify %s
+
+// A `goto *p` that leaves a scope needing cleanup (here a VLA stack restore)
+// must run that cleanup on the branch. That is not implemented yet, so it is
+// reported rather than lowered to a branch that skips the cleanup.
+int vla(int n) {
+ int a[n];
+ void *p = &&done;
+ // expected-error@+1 {{indirect goto across a cleanup scope}}
----------------
adams381 wrote:
Changed this to `indirect goto with active cleanup`. It no longer claims the
same-scope target exits the cleanup.
https://github.com/llvm/llvm-project/pull/206176
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits