From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ed23aab45a548fd6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-23 07:03:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: Errornous String instantiation Date: Wed, 23 Jul 2003 14:03:29 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1058969009 20717 217.17.192.37 (23 Jul 2003 14:03:29 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Wed, 23 Jul 2003 14:03:29 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:40705 Date: 2003-07-23T14:03:29+00:00 List-Id: * Lutz Donnerhacke wrote: > Sorry for posting this problem in such an early stage, but it's a moving > target where small modifications of the source the problem cause to disappear. > So I present a short (but not buggy) example of the source skeleton in > question and show you some results of the real data. Current workaround: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv package Top is type Constant_String is access constant String; type Constant_String_Array is array(Positive range <>) of Constant_String; end Top; + with Top; + package Constants is t1 : aliased constant String := "Test"; t2 : aliased constant String := "A longer test string"; + + a : constant Top.Constant_String_Array := (t1'Access, t2'Access); end Constants; generic data : Constant_String_Array; package Top.Generic_Package is pragma Elaborate_Body; end Top.Generic_Package; with Top.Generic_Package, Constants; - use Constants; - package MyPackage is new Top.Generic_Package((t1'Access, t2'Access)); + package MyPackage is new Top.Generic_Package(Constants.a); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This requires the compiler to instantiate t1 in the scope of Constants for external use. And this is done correctly.