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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!uflorida!novavax!augusta!bs From: bs@augusta.UUCP (Burch Seymour) Newsgroups: comp.lang.ada Subject: Re: converted types as actual in out parameters Message-ID: <1300@augusta.UUCP> Date: 23 Sep 88 15:41:55 GMT References: <8809151803.AA17461@ajpo.sei.cmu.edu> Organization: Gould CSD, Fort Lauderdale, FL List-Id: in article <8809151803.AA17461@ajpo.sei.cmu.edu>, GDAU100@BGUVM.BITNET ("Jonathan B. Owen") says: > > The following worked for Vax-Ada but not for Verdix Ada. Any thoughts? > Is it a quirk of Vax-Ada to allow the following or a bug of Verdix > which causes the return of erronious values? (text of test omitted) I ran this on the Gould compiler (Telesoft - Telegen 2) and it got the "Vax" result. I check the generated code and this is what happened: 1) The short integer is moved onto the stack - no check needed as a small is converted to a large. 2) The procedure is called. The result is on the stack at return as type integer. 3) The result is checked for range as a large is being converted to a smaller type. 4) The result is put away. I'm not a language lawyer, but this seems to be the way to do this. I'd guess the Verdix has a bug. -Burch Seymour - Gould CSD