Files
gcc-reflection/gcc/testsuite/gnat.dg/bit_packed_array6.adb
Eric Botcazou 1eff5289b2 Fix miscompilation of predicate on bit-packed array types
This is a regression present on the mainline and 11 branch in the form of a
miscompilation by the new mod/ref IPA pass of code that passes constrained
bit-packed array objets in a call to a subprograms taking unconstrained
bit-packed array parameters, which occurs for predicate on bit-packed array
types for example.

gcc/ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Add PAT
	local constant and use it throughout.  If it is set, use a ref-all
	pointer type for the pointer-to-array field of the fat pointer type.
	<E_Array_Subtype>: Add PAT local constant and use it throughout.
gcc/testsuite/
	* gnat.dg/bit_packed_array6.adb: New test.
	* gnat.dg/bit_packed_array6_pkg.ads: New helper.
2021-06-03 13:32:08 +02:00

11 lines
219 B
Ada

-- { dg-do run }
-- { dg-options "-O2 -gnata -gnatVa" }
with Bit_Packed_Array6_Pkg; use Bit_Packed_Array6_Pkg;
procedure Bit_Packed_Array6 is
B : constant Boolean := Everywhere (K_Configuration);
begin
null;
end;