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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,16e3a8dd4f3ab3f3 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Elaboration order Date: 1996/03/20 Message-ID: #1/1 X-Deja-AN: 143319968 references: <314701A1.469D@lfwc.lockheed.com> <314D2E1C.5C72@lfwc.lockheed.com> <4in4am$klb@watnews1.watson.ibm.com> <4inpiv$alk@cliffy.lfwc.lockheed.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-03-20T00:00:00+00:00 List-Id: In article <4inpiv$alk@cliffy.lfwc.lockheed.com>, Cordes MJ wrote: >As an aside to the RM discussion of this thread, how do I know >that Ada compiler X will generate the correct (as defined in >the RM) elaboration order? You don't. A compiler is a complex program, and probably has bugs. FWIW, I've never seen this particular bug in an Ada implementation. It's not very hard to get it right -- it's a fairly simple graph-walking algorithm. I *have* seen bugs in Ada compilers, but not this particular bug. >I know that ACVC tests do not guarantee correct code generation. Yes, of course. No test suite can be complete, since there are an infinite number of possible Ada programs. >Is the ACVC suite more complete when it comes to elaboration? I dunno. I know there are *some* tests for this. >...Is >there a standard benchmark used by compiler vendors? The ACVC. Also, the ACEC or whatever it's called, which tests performance, as opposed to conformance to the Standard. Beyond that, it's up to the compiler vendor to do whatever testing is deemed necessary. >...Or, for safety >critical functions, should I verify this for every application >build? For safety critical functions, you should not trust your compiler. You should print out the machine code, and verify correctness at that level. This is very expensive, of course. But if lives are at stake (or large amounts of money), that's what people do. But there's nothing about elaboration order issues that makes this a particularly error-prone part. - Bob