gcc/jit/ChangeLog:
PR jit/95306
* jit-builtins.c (builtins_manager::make_primitive_type):
Implement BT_CONST_VOLATILE_PTR.
gcc/testsuite/ChangeLog:
PR jit/95306
* jit.dg/test-pr95306-builtin-types.c (create_code): Add
test of getting __atomic_load.
case BT_VOLATILE_PTR:
return (m_ctxt->get_type (GCC_JIT_TYPE_VOID)->get_volatile ()
->get_pointer ());
- // case BT_CONST_VOLATILE_PTR:
+ case BT_CONST_VOLATILE_PTR:
+ return (m_ctxt->get_type (GCC_JIT_TYPE_VOID)->get_const ()
+ ->get_volatile ()->get_pointer ());
// case BT_PTRMODE:
case BT_INT_PTR:
return m_ctxt->get_type (GCC_JIT_TYPE_INT)->get_pointer ();
#define CHECK_BUILTIN(NAME) \
CHECK_NON_NULL (gcc_jit_context_get_builtin_function (ctxt, NAME));
+ CHECK_BUILTIN ("__atomic_load");
CHECK_BUILTIN ("__builtin_memcpy");
CHECK_BUILTIN ("__builtin_sadd_overflow");