This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/18762] New: Illegal program not detected, RM 6.3.1(7), 8.5.4(5), 13.14(3)
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2004 19:12:45 -0000
- Subject: [Bug ada/18762] New: Illegal program not detected, RM 6.3.1(7), 8.5.4(5), 13.14(3)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
(Debian bug #283833)
-- RM 8.5.4(5) the convention of the renamed subprogram shall not
-- be Intrinsic, if the renaming-as-body completes that declaration
-- after the subprogram it declares is frozen.
-- RM 13.14(3) the end of the declaration of a library package
-- causes freezing of each entity declared within it.
-- RM 6.3.1(7) the default calling convention is Intrinsic for
-- any other implicitly declared subprogram unless it is a
-- dispatching operation of a tagged type.
package pak1 is
type T1 is null record;
procedure p1 (x1: T1);
type T2 is new T1;
end pak1;
package body Pak1 is
procedure P1 (X1 : T1) is begin null; end P1;
end Pak1;
with pak1;
package Test_132 is
procedure p2 (x2: pak1.T2);
end Test_132;
package body Test_132 is
procedure p2 (x2: pak1.T2) renames pak1.p1; --ERROR: can't rename intrinsic
end Test_132;
The compiler says nothing; the expected output is:
test_132.adb:2:43: subprogram used in renaming_as_body cannot be intrinsic
--
Summary: Illegal program not detected, RM 6.3.1(7), 8.5.4(5),
13.14(3)
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
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=18762