https://gcc.gnu.org/g:8c828583366c8b3877cc4488749b72e954b5df64
commit r16-2339-g8c828583366c8b3877cc4488749b72e954b5df64 Author: Bob Duff <d...@adacore.com> Date: Fri Jun 27 12:00:54 2025 -0400 ada: Back out change to Tbuild.Unchecked_Convert_To ...because it breaks one test that uses --RTS=light. "Is_Composite_Type" is needed; "not Is_Scalar_Type" was wrong. gcc/ada/ChangeLog: * tbuild.adb (Unchecked_Convert_To): Back out change. Diff: --- gcc/ada/tbuild.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb index b89c40851bc1..52fdbfc2163f 100644 --- a/gcc/ada/tbuild.adb +++ b/gcc/ada/tbuild.adb @@ -926,11 +926,11 @@ package body Tbuild is -- conversion of an unchecked conversion. Extra unchecked conversions -- make the .dg output less readable. We can't do this in cases -- involving bitfields, because the sizes might not match. The - -- "not Is_Scalar_Type" checks avoid such cases. + -- Is_Composite_Type checks avoid such cases. elsif Nkind (Expr) = N_Unchecked_Type_Conversion - and then not Is_Scalar_Type (Etype (Expr)) - and then not Is_Scalar_Type (Typ) + and then Is_Composite_Type (Etype (Expr)) + and then Is_Composite_Type (Typ) then Set_Subtype_Mark (Expr, New_Occurrence_Of (Typ, Loc)); Result := Relocate_Node (Expr);