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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b563623c98f6fb66 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!feeder.ecngs.de!ecngs!feeder2.ecngs.de!npeer.de.kpn-eurorings.net!npeer1.kpn.DE!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: GNAT GPL 2007 Problems with generics Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <14839k5x0otsk.mv0vz7fjh95y$.dlg@40tude.net> Date: Tue, 15 May 2007 22:43:33 +0200 Message-ID: NNTP-Posting-Date: 15 May 2007 22:43:12 CEST NNTP-Posting-Host: 0ffee452.newsspool1.arcor-online.net X-Trace: DXC=O@mOhiS:\\9kUFX=Y?aLP;ic==]BZ:af>4Fo<]lROoR1Fl8W>\BH3Y2N=gZ0LSBW:1DNcfSJ;bb[5IRnRBaCdCRN^2`SW0J11hf;PM?@3E7 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15801 Date: 2007-05-15T22:43:12+02:00 List-Id: On Tue, 15 May 2007 16:14:37 +0200, Dmitry A. Kazakov wrote: > Does anybody know anything about the following problem. When a generic > package A instantiates another generic package B and refers to a subprogram > C from its body, then under certain circumstances (I cannot figure out > when), everything compiles, but then fails in gnatlink on "undefined > reference to xxxx" From the cryptic name xxxx, it seems that the module it > fails to find is the subprogram B.C (an instance in the instance of A) > > The name xxxx has the pattern: > > ______2X OK, I have figured out the problem. The bug is related to the visibility rules. It appears when C refers to a parameter of the type T declared in some fourth package D. In the specification of B it does this as C (...; X : T;...). In the body it does it as C (...; X : D.T; ...). The problem disappears when both become X : T. [ As far as I can remember, they had to be different to work around another bug in some earlier version of GNAT. ] -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de