mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
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.
11 lines
219 B
Ada
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;
|