[Bug ada/86391] New: Cannot pass array as aliased formal parameter
laguest at archeia dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 3 14:23:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86391
Bug ID: 86391
Summary: Cannot pass array as aliased formal parameter
Product: gcc
Version: 6.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: laguest at archeia dot com
Target Milestone: ---
When passing an initialised array as an aliased formal, the compiler complains:
mem.adb:13:11: untagged actual does not match aliased formal "B"
Source:
procedure Mem is
type IA is array (Positive range <>) of Integer;
type IA_Ptr is access all IA;
procedure Inner (B : aliased in out IA) is null;
-- S : aliased IA (1 .. 10) := (others => 0); -- This does not work
for some reason??
-- S : aliased IA (1 .. 10) := (1 .. 10 => 0); -- This does not work
for some reason??
-- S : aliased IA := (1 .. 10 => 0); -- This works.
-- S : aliased IA := (0, 1, 2, 3, 4, 5); -- This works.
begin
Inner (S);
end Mem;
More information about the Gcc-bugs
mailing list