public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/46256] New: Combination of protected type, interfaces and unchecked deallocation causes the compiler to crash.
@ 2010-10-31 21:27 prog at msobczak dot com
0 siblings, 0 replies; only message in thread
From: prog at msobczak dot com @ 2010-10-31 21:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46256
Summary: Combination of protected type, interfaces and
unchecked deallocation causes the compiler to crash.
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: prog@msobczak.com
with Ada.Unchecked_Deallocation;
procedure Test is
package P is
type My_Interface is limited interface;
procedure Do_Something (X : in out My_Interface) is abstract;
end P;
protected type My_Protected is new P.My_Interface with
overriding
procedure Do_Something;
end My_Protected;
protected body My_Protected is
overriding
procedure Do_Something is
begin
null;
end Do_Something;
end My_Protected;
type My_Protected_Ptr is access My_Protected;
procedure Free is new Ada.Unchecked_Deallocation
(Object => My_Protected, Name => My_Protected_Ptr);
Ptr : My_Protected_Ptr;
begin
-- here come dragons:
--Free (Ptr);
null;
end Test;
Uncommenting the indicated line causes all known compiler versions to crash
with internal error.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-31 21:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-31 21:27 [Bug ada/46256] New: Combination of protected type, interfaces and unchecked deallocation causes the compiler to crash prog at msobczak dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).