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-Thread: 103376,ad0f09f84e0c9396,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!news-lei1.dfn.de!news.uni-jena.de!not-for-mail From: Christopher Broeg Newsgroups: comp.lang.ada Subject: clarification of ARM 12.3 Generic Instantiation Date: Thu, 24 Mar 2005 14:36:55 +0100 Organization: Friedrich Schiller University Jena, Germany Message-ID: NNTP-Posting-Host: ent.astro.uni-jena.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: fsuj29.rz.uni-jena.de 1111671415 14270 141.35.25.76 (24 Mar 2005 13:36:55 GMT) X-Complaints-To: news@rz.uni-jena.de NNTP-Posting-Date: 24 Mar 2005 13:36:55 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:9905 Date: 2005-03-24T13:36:55+00:00 List-Id: Hello, I am having problems understanding the following sentence in the ARM: 12.3 Generic Instantiation Post-Compilation Rules 19 "Recursive generic instantiation is not allowed in the following sense: if a given generic unit includes an instantiation of a second generic unit, then the instance generated by this instantiation shall not include an instance of the first generic unit (whether this instance is generated directly, or indirectly by intermediate instantiations)." Is it thus allowed to have a generic package A that instantiates the generic packages B and C when package C also instantiates package B? I am experiencing very strange behaviour and I am having a rather complicated nested generic instantiation structure. A spline package is used to interpolate several tabulated functions which are then combined and again tabulated in an array which is again interpolated. Running the above in a seperate test program works fine. When I include it in my large code, the result is radom. Sometimes it works, sometimes the numbers are wrong and sometimes the numbers are even NaN values. This all depends on the array dimensions say 100x100 or 1000x1000 might work and 300x200 crashes. Further it depends on the floating point type. digits 18 crashes often, but long_float and even float fails in some cases. I am compiling using GNAT Academic verision. I tried -fstack-check and elaboration order. Everything seems fine. Sorry if I am confusing but this is all very hard to explain. thanks for any help, Chris