From: Eric Botcazou Date: Fri, 13 Jun 2025 07:51:52 +0000 (+0200) Subject: ada: Fix poor code generated for return of Out parameter with access type X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d4073371168cf5e9f58d18f617b117fb5839f81;p=thirdparty%2Fgcc.git ada: Fix poor code generated for return of Out parameter with access type The record type of the return object is unnecessarily given BLKmode. gcc/ada/ChangeLog: * gcc-interface/decl.cc (type_contains_only_integral_data): Do not return false only because the type contains pointer data. --- diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 27d2cea1f3d..903ec844b96 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -6022,7 +6022,8 @@ gnat_to_gnu_profile_type (Entity_Id gnat_type) return gnu_type; } -/* Return true if TYPE contains only integral data, recursively if need be. */ +/* Return true if TYPE contains only integral data, recursively if need be. + (integral data is to be understood as not floating-point data here). */ static bool type_contains_only_integral_data (tree type) @@ -6042,7 +6043,7 @@ type_contains_only_integral_data (tree type) return type_contains_only_integral_data (TREE_TYPE (type)); default: - return INTEGRAL_TYPE_P (type); + return INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type); } gcc_unreachable ();