[clang] [clang][CodeGen] Fix casting 'AddrLabelExpr' to a differernt addrspace (PR #237887)
Ben Shi via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 9 01:48:00 PST 2026
================
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple avr -emit-llvm %s -o - | FileCheck %s
+
+// This test case verifies https://github.com/llvm/llvm-project/issues/236067 .
+
+extern void foo_0(void);
+extern void foo_1(void);
+
+void foo(int a) {
+ void *p = &&label_0;
----------------
benshi001 wrote:
The addrspace is marked as a field of variable `p`, not stored to the runtime stack slot. So would it be better to report an error of such code?
https://github.com/llvm/llvm-project/pull/237887
More information about the cfe-commits
mailing list