[clang] [CIR] Defer indirect goto resolution to GotoSolver (PR #206176)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 13:56:39 PDT 2026
================
@@ -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 at +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
More information about the cfe-commits
mailing list