This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/17307] New: Bug box in Gigi, code=116, 'Unrestricted_Access of a protected subprogram
- 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: 3 Sep 2004 16:49:38 -0000
- Subject: [Bug ada/17307] New: Bug box in Gigi, code=116, 'Unrestricted_Access of a protected subprogram
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Reported to Debian (#269775) by Daniel Simon; I edited the test case slightly.
with Ada.Interrupts.Names;
procedure Test_269775 is
pragma Unreserve_All_Interrupts;
protected type Bla is
procedure Sigint;
end Bla;
protected body Bla is
procedure Sigint is
begin
null;
end Sigint;
end Bla;
X : Bla;
begin
Ada.Interrupts.Attach_Handler
(New_Handler => X.Sigint'Unrestricted_Access,
Interrupt => Ada.Interrupts.Names.SIGINT);
end Test_269775;
$ gcc -c test_269775.ads
+===========================GNAT BUG DETECTED==============================+
| 3.15p (20020523) (i686-pc-linux-gnu) Gigi abort, Code=116 |
| Error detected at test_269775.adb:18:22 |
| Please submit bug report by email to report@gnat.com. |
| Use a subject line meaningful to you and us to track the bug. |
| (include your customer number #nnn in the subject line). |
| Include the entire contents of this bug box in the report. |
| Include the exact gcc or gnatmake command that you entered. |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files). |
| (use plain ASCII or MIME attachment, or FTP to your customer directory). |
| See README.GNATPRO for full info on procedure for submitting bugs. |
+==========================================================================+
Please include these source files with error report
test_269775.adb
compilation abandoned
gnatmake: "test_269775.adb" compilation error
I have confirmed this bug in Debian 3.15p-11, 3.4.0-1 and the binary
distribution of 3.15p from Ada Core. The bug box is always the same.
I also tried to replace 'Unrestricted_Access with 'Unchecked_Access
and 'Access.
With 'Access, the program compiles but raises Program_Error with the
message "Trying to overwrite a static Interrupt Handler with a dynamic
Handler". I think this is due to Linux; on a bare-board or real-time
kernel, this probably works.
With 'Unchecked_Access, the compiler says "attribute
"Unchecked_Access" cannot be applied to protected operation". This is
correct as per RM 13.10(2, 5).
--
Ludovic Brenta.
--
Summary: Bug box in Gigi, code=116, 'Unrestricted_Access of a
protected subprogram
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=17307