[Bug ada/37110] Assert_Failure at atree.adb:886 caused by legal prefixed notation
nicolas.boulenguez at free dot fr
gcc-bugzilla@gcc.gnu.org
Sat Sep 3 03:24:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37110
--- Comment #5 from nicolas.boulenguez at free dot fr 2011-09-03 03:23:36 UTC ---
-- There were two distinct bugs.
package P is
type T1 is tagged null record;
type T2 is tagged null record;
function Func (Func_Formal : in T1'Class;
I : in Integer)
return access T2;
procedure Proc (Proc_Formal : out T2);
end P;
-- This legal line causes a bug box.
-- 4.4.6 (x86_64-pc-linux-gnu) Assert_Failure sinfo.adb:1149
-- 4.6.1 (x86_64-pc-linux-gnu) Assert_Failure sinfo.adb:1240
with P; use P;
procedure Trigger1 is
Actual : constant T1 := (null record);
begin
Proc (Proc_Formal => Func (Func_Formal => Actual, I => 0).all);
end Trigger1;
-- Obsessive Obfuscated Programming on Trigger1 caused another kind of
-- bug box with 4.3 and 4.4.
-- 4.4.6 (x86_64-pc-linux-gnu) Assert_Failure atree.adb:884
-- 4.6.1 (x86_64-pc-linux-gnu) detects the missing body.
with P; use P;
procedure Trigger2 is
Actual : constant T1 := (null record);
begin
Actual.Func (0).Proc;
end Trigger2;
More information about the Gcc-bugs
mailing list