bool extern_flag
= ((Is_Public (gnat_entity) && !definition)
|| imported_p
- || (Convention (gnat_entity) == Convention_Intrinsic
+ || (Is_Intrinsic_Subprogram (gnat_entity)
&& Has_Pragma_Inline_Always (gnat_entity)));
tree gnu_param_list;
/* Builtins are expanded inline and there is no real call sequence involved.
So the type expected by the underlying expander is always the type of the
argument "as is". */
- if (Convention (gnat_subprog) == Convention_Intrinsic
+ if (Is_Intrinsic_Subprogram (gnat_subprog)
&& Present (Interface_Name (gnat_subprog)))
mech = By_Copy;
else
{
- /* For foreign convention subprograms, return System.Address as void *
- or equivalent. Note that this comprises GCC builtins. */
- if (Has_Foreign_Convention (gnat_subprog)
+ /* For foreign convention/intrinsic subprograms, return System.Address
+ as void * or equivalent; this comprises GCC builtins. */
+ if ((Has_Foreign_Convention (gnat_subprog)
+ || Is_Intrinsic_Subprogram (gnat_subprog))
&& Is_Descendant_Of_Address (Underlying_Type (gnat_return_type)))
gnu_return_type = ptr_type_node;
else
{
Entity_Id gnat_param_type = Etype (gnat_param);
- /* For foreign convention subprograms, pass System.Address as void *
- or equivalent. Note that this comprises GCC builtins. */
- if (Has_Foreign_Convention (gnat_subprog)
+ /* For foreign convention/intrinsic subprograms, pass System.Address
+ as void * or equivalent; this comprises GCC builtins. */
+ if ((Has_Foreign_Convention (gnat_subprog)
+ || Is_Intrinsic_Subprogram (gnat_subprog))
&& Is_Descendant_Of_Address (Underlying_Type (gnat_param_type)))
gnu_param_type = ptr_type_node;
else
/* If this subprogram is expectedly bound to a GCC builtin, fetch the
corresponding DECL node and check the parameter association. */
- if (Convention (gnat_subprog) == Convention_Intrinsic
+ if (Is_Intrinsic_Subprogram (gnat_subprog)
&& Present (Interface_Name (gnat_subprog)))
{
tree gnu_ext_name = create_concat_name (gnat_subprog, NULL);