GNATMAKE 4.1.0 20050321 (experimental) Copyright 1995-2004 Free Software Foundation, Inc. "uex.ali" being checked ... -> "exmpl.ads" time stamp mismatch gcc -c -gnat05 uex.adb +===========================GNAT BUG DETECTED==============================+ | 4.1.0 20050321 (experimental) (i686-pc-linux-gnu) Storage_Error stack overflow (or erroneous memory access)| | Error detected at uex.adb:9:15 | | 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. uex.adb exmpl.ads compilation abandoned End of compilation gnatmake: "uex.adb" compilation error Not using dotted notation does not trigger. Using Natural in place of Unbounded_String works, too. Supplying an alternate Hash function does _not_ prevent the box. GCC 4.0 displays the box, too. with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Exmpl; procedure uex is use Exmpl.US_Lookup_Tables; hm: Map; begin hm.include(To_Unbounded_String("key"), To_Unbounded_String("value")); --include(hm, To_Unbounded_String("key"), To_Unbounded_String("value")); end uex; with Ada.Containers.Hashed_Maps; with Ada.Strings.Unbounded, Ada.Strings.Unbounded.Hash; package Exmpl is use Ada.Strings.Unbounded; package US_Lookup_Tables is new Ada.Containers.Hashed_Maps (Unbounded_String, Unbounded_String, Equivalent_Keys => "=", Hash => Hash); end Exmpl;
Could you try the patch from PR ada/20593 and report? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20593
Subject: Re: Bug Box, combination of Ada 2005, dotted notation, Hash_Maps, and Unbounded_String laurent at guerby dot net wrote: >------- Additional Comments From laurent at guerby dot net 2005-03-23 11:55 ------- >Could you try the patch from PR ada/20593 and report? >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20593 > > > > > just patching varasm.c and rerunning make still has the same result. I'll try a fresh compiler. -- Georg
This was a wild guess, the problem is probably elsewhere. On x86_64 I get a slightly more explicit location: $ gcc -c -gnat05 uex.adb ===========================GNAT BUG DETECTED==============================+ | 4.1.0 20050324 (experimental) (x86_64-unknown-linux-gnu) Program_Error sem_type.adb:1587 explicit raise| | Error detected at uex.adb:9:15 |
Now works fine on mainline. Arno