public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/15807] New: Legal program runs incorrectly, RM 3.10.2(3,29)
@ 2004-06-03 19:22 ludovic dot brenta at insalien dot org
2004-10-12 4:02 ` [Bug ada/15807] " pinskia at gcc dot gnu dot org
2004-11-24 20:37 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 5+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-06-03 19:22 UTC (permalink / raw)
To: gcc-bugs
(Debian bug #246390)
-- RM 3.10.2(3)
-- The accessibililty rules, which prevent dangling references, are written
-- in terms of accessibility levels,...
-- RM 3.10.2(29)
-- A check is made that the accessibility level of X is not deeper than
-- that of the access type A. If this check fails, Program_Error is
-- raised.
with Text_IO; use Text_IO;
procedure Test_246390 is
type T1 is tagged null record;
type T2 is new T1 with record
A : aliased T1;
end record;
type T1_Access is access all T1'Class;
X : T1_Access;
procedure Test_Access (Param: access T2) is
begin
X := Param.A'Access;
end Test_Access;
procedure Inner_Proc is
Inner : aliased T2;
begin
-- X := Inner.A'access; -- this case caught at compile time
Test_Access (Inner'access); -- equivalent run-time case not caught
Put_Line ("failed: program_error not raised");
exception
when Program_Error =>
Put_Line("passed");
when others =>
Put_Line ("failed: other exception raised");
end;
begin
Inner_Proc;
end Test_246390;
The program should print "passed", but it prints:
failed: program_error not raised
--
Summary: Legal program runs incorrectly, RM 3.10.2(3,29)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic dot brenta at insalien dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15807
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/15807] Legal program runs incorrectly, RM 3.10.2(3,29)
2004-06-03 19:22 [Bug ada/15807] New: Legal program runs incorrectly, RM 3.10.2(3,29) ludovic dot brenta at insalien dot org
@ 2004-10-12 4:02 ` pinskia at gcc dot gnu dot org
2004-11-24 20:37 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-12 4:02 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15807
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/15807] Legal program runs incorrectly, RM 3.10.2(3,29)
2004-06-03 19:22 [Bug ada/15807] New: Legal program runs incorrectly, RM 3.10.2(3,29) ludovic dot brenta at insalien dot org
2004-10-12 4:02 ` [Bug ada/15807] " pinskia at gcc dot gnu dot org
@ 2004-11-24 20:37 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-24 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-24 20:37 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-11-24 20:37:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15807
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <bug-15807-286@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2008-08-17 10:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 19:22 [Bug ada/15807] New: Legal program runs incorrectly, RM 3.10.2(3,29) ludovic dot brenta at insalien dot org
2004-10-12 4:02 ` [Bug ada/15807] " pinskia at gcc dot gnu dot org
2004-11-24 20:37 ` pinskia at gcc dot gnu dot org
[not found] <bug-15807-286@http.gcc.gnu.org/bugzilla/>
2007-12-13 14:03 ` sam at gcc dot gnu dot org
2008-08-17 10:57 ` sam at gcc dot gnu dot org
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).