public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/17307] New: Bug box in Gigi, code=116, 'Unrestricted_Access of a protected subprogram
@ 2004-09-03 16:49 ludovic dot brenta at insalien dot org
  2004-10-12 21:59 ` [Bug ada/17307] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-09-03 16:49 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-17 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-03 16:49 [Bug ada/17307] New: Bug box in Gigi, code=116, 'Unrestricted_Access of a protected subprogram ludovic dot brenta at insalien dot org
2004-10-12 21:59 ` [Bug ada/17307] " pinskia at gcc dot gnu dot org
2005-01-11  2:47 ` pinskia at gcc dot gnu dot org
2005-01-12 10:41 ` charlet at adacore dot com
2005-01-17 13:54 ` charlet 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).