https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112108
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Andrew Carlotti <acarlo...@gcc.gnu.org>: https://gcc.gnu.org/g:8485606056ed3ca0d0acf6e0d943975e9173e7cd commit r14-10634-g8485606056ed3ca0d0acf6e0d943975e9173e7cd Author: Andrew Carlotti <andrew.carlo...@arm.com> Date: Tue Jul 18 20:09:38 2023 +0100 aarch64: Fix memtag intrinsic availability The availability of memtag intrinsics and data types were determined solely by the globally specified architecture features, which did not reflect any changes specified in target pragmas or attributes. This patch removes the initialisation-time guards for the intrinsics, and replaces them with checks at use time. It also removes the macro indirection from the header file - this simplifies the header, and allows the missing extension error reporting to find the user-facing intrinsic names. gcc/ChangeLog: PR target/112108 * config/aarch64/aarch64-builtins.cc (aarch64_init_memtag_builtins): Define intrinsic names directly. (aarch64_general_init_builtins): Move memtag intialisation... (handle_arm_acle_h): ...to here, and remove feature check. (aarch64_general_check_builtin_call): Check memtag intrinsics. * config/aarch64/arm_acle.h (__arm_mte_create_random_tag) (__arm_mte_exclude_tag, __arm_mte_ptrdiff) (__arm_mte_increment_tag, __arm_mte_set_tag, __arm_mte_get_tag): Remove. gcc/testsuite/ChangeLog: PR target/112108 * gcc.target/aarch64/acle/memtag_guard-1.c: New test. * gcc.target/aarch64/acle/memtag_guard-2.c: New test. * gcc.target/aarch64/acle/memtag_guard-3.c: New test. * gcc.target/aarch64/acle/memtag_guard-4.c: New test.