Expansion of assignments to packed array objects with string literals on
the right-hand side, created an unnecessary conversion, i.e.:
... :=
component_type
(declare
temp : component_type := "string_literal";
begin
temp)
Now the expansion omits the outer type conversion.
Cleanup; behavior is unaffected.
gcc/ada/
* exp_pakd.adb (Expand_Bit_Packed_Element_Set): Simplify handling of
assignments with string literals.
Insert_Actions (N, New_List (Decl));
Rhs := New_Occurrence_Of (Defining_Identifier (Decl), Loc);
end;
+ else
+ Rhs := Convert_To (Ctyp, Rhs);
end if;
- Rhs := Convert_To (Ctyp, Rhs);
Set_Parent (Rhs, N);
-- If we are building the initialization procedure for a packed array,