From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.8 required=3.0 tests=BAYES_50,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:570b:: with SMTP id 11mr23360098qtw.128.1636789569895; Fri, 12 Nov 2021 23:46:09 -0800 (PST) X-Received: by 2002:a5b:f50:: with SMTP id y16mr23675309ybr.159.1636789569762; Fri, 12 Nov 2021 23:46:09 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 12 Nov 2021 23:46:09 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=84.209.88.37; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 84.209.88.37 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <29091147-1b81-4a3b-a646-c6a6d1ebe4ean@googlegroups.com> Subject: Did I find a (nearly-)gotcha here? From: reinert Injection-Date: Sat, 13 Nov 2021 07:46:09 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63115 List-Id: Hello, Assume the following program: with Text_Io; use Text_Io; procedure test2 is procedure test_a(ok : out Boolean) is begin if false then ok := true; end if; end test_a; procedure test_b(ok : in out Boolean) is begin if false then ok := true; end if; end test_b; ok_a,ok_b : Boolean := true; begin test_a(ok_a); test_b(ok_b); Put_Line("ok_a = " & ok_a'Image); Put_Line("ok_b = " & ok_b'Image); end test2; I get the following output (using GNAT Community Edition): ok_a = FALSE ok_b = TRUE As far as I understand, this is correct. However, I think I remember that (some) older versions of the GNAT compiler gave a different result. Could others try? And does my program example reveal an unnecessary gotcha? reinert