[Bug ada/27776] New: GNAT creates bug box when instatiating a 'limited with'ed access type

belandor at web dot de gcc-bugzilla@gcc.gnu.org
Sat May 27 07:44:00 GMT 2006


The following code creates a bug box when compiled with

gnatmake -gnat05 bug-test.adb


the gcc-4.1.0 version needed a patch in erroutc.adb and s-wchcon.ad[sb] to
compile.

ap@strauss2 ~/academics/Modelling/bug-test $ gnatmake -gnat05 bug_test
gcc -c -gnat05 bug_test.adb
gcc -c -gnat05 edges.ads
gcc -c -gnat05 nodes.ads
+===========================GNAT BUG DETECTED==============================+
| 4.1.0 (i686-pc-linux-gnu) in save_gnu_tree, at ada/utils.c:163           |
| Error detected at a-contai.ads:20:40                                     |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Use a subject line meaningful to you and us to track the bug.            |
| 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).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

A bug box also appears using the current SVN trunk (revision 114127):

ap@strauss2 ~/academics/Modelling/bug-test $
/home/ap/crossGNAT/gcc-SVN/install/bin/gnatmake bug_test
gcc -c bug_test.adb
gcc -c edges.ads
gcc -c nodes.ads
+===========================GNAT BUG DETECTED==============================+
| 4.2.0 20060526 (experimental) (i686-pc-linux-gnu) GCC error:             |
| in save_gnu_tree, at ada/utils.c:162                                     |
| Error detected at a-contai.ads:20:40                                     |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Use a subject line meaningful to you and us to track the bug.            |
| 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).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

nodes.ads
edges.ads

compilation abandoned
gnatmake: "nodes.ads" compilation error


-- Files follow here (filenames should be easily deductable)

with Nodes; with Edges;

procedure Bug_test is
begin
   null;
end Bug_Test;

with Ada.Containers.Doubly_Linked_Lists;

with Edges; use Edges;

package Nodes is
   type Node_T;
   type Node_A is access all Node_T;

   type Node_T is record
      Outgoing_Edges : Edges.Edge_Lists.List;
   end record;

end Nodes;

with Ada.Containers.Doubly_Linked_Lists;

limited with Nodes;

package Edges is
   type Edge_T;
   type Edge_T is record
      From, To : access Nodes.Node_T;
   end record;

   type Edge_A is access all Edge_T;

   package Edge_Lists is new Ada.Containers.Doubly_Linked_Lists
     (Edges.Edge_A, Edges."=");


end Edges;


-- 
           Summary: GNAT creates bug box when instatiating a 'limited
                    with'ed access type
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belandor at web dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27776



More information about the Gcc-bugs mailing list