Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 27776
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Eric Botcazou <ebotcazou@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Andreas Pfeil <belandor@web.de>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 27776 depends on: Show dependency tree
Show dependency graph
Bug 27776 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-05-28 09:18 Opened: 2006-05-27 07:43
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;

------- Comment #1 From Laurent GUERBY 2006-05-27 08:54 -------
Confirmed on both branches.

$ gcc -c -gnat05 nodes.ads
+===========================GNAT BUG DETECTED==============================+
| 4.2.0 20060511 (experimental) (x86_64-unknown-linux-gnu) GCC error:      |
| in save_gnu_tree, at ada/utils.c:162                                     |
| Error detected at a-contai.ads:20:40                                     |

$ gcc -c -gnat05 nodes.ads
+===========================GNAT BUG DETECTED==============================+
| 4.1.0 (x86_64-unknown-linux-gnu) in save_gnu_tree, at ada/utils.c:163    |
| Error detected at a-contai.ads:20:40                                     |

------- Comment #2 From Eric Botcazou 2006-05-28 09:18 -------
Confirmed, Gigi is not prepared for this kind of circularity.

------- Comment #3 From Arnaud Charlet 2006-10-31 19:41 -------
Fixed on mainline.

Arno

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug