From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hQ52KjZHkGqNfwYAWB0awg (envelope-from ) for ; Thu, 27 Aug 2026 10:18:30 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0HXhBMnC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=xsxHflCE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=hh/ghw2b; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+Ga0DzMA; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8980D1E0A3; Thu, 27 Aug 2026 10:18:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 62C201E033 for ; Thu, 27 Aug 2026 10:18:26 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE29B4BA79AA for ; Thu, 27 Aug 2026 14:18:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE29B4BA79AA Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0HXhBMnC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=xsxHflCE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=hh/ghw2b; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+Ga0DzMA Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 652AA4BA7997 for ; Thu, 27 Aug 2026 14:17:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 652AA4BA7997 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 652AA4BA7997 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787840277; cv=none; b=lGjtCOcsXznghIvgwZlJtL9ilGIiu2tEeHcwQtyU4s26MdRv3415jz9U7EYMdIZYXgbXVCUTPoIiCZqZUNlmXHz9oDUfILkUqOK0q9iIC/Sz8Qzi3inFnUitSWvsFnBe2ck+NnMUgu5jU9pWXawHl4xigVjuyiZyR9b5QbbjuVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787840277; c=relaxed/simple; bh=4fTw92Cg6q5LyJu76Ay9LJBQpsoJ07Pji0VBh7Xj1bU=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=m1v0cR/0N8EHG7cwPkZqIS3vWhYRcV278ylqP5DxJc/1dAklas3lC4t/YcoZntbkC/WC09D1ZKuZ00LfCNvzkjPBGnAkoihlgrsCC/Ar8axGTO4+e6yhJNsbEQb5QDrOzvBZOI/4ak5RwhHnVEBbeeCCxcUM2nT575T4a0SIMuE= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0HXhBMnC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=xsxHflCE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=hh/ghw2b; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+Ga0DzMA DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 652AA4BA7997 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 115361FB1B; Thu, 27 Aug 2026 14:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1787840272; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gUtFsNrt3vO1Ljd5Qt3gkNWnYLA8QkCMnBu7NfgUZzo=; b=0HXhBMnCjF2EcWQ3NUocicYI1L0sBZTrb59nglM2hwza+PYJVbng/BInREyVL1/N7WC3H7 ATzPyRPTVL3ghZ6VCPRGUYalCpZ9pvtUeUqOr4h5VOBPm3kv6q9eo7zbxRngg7O+oevnZc Qan+dy59xbme50Wf1VTbuynhosr16gk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1787840272; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gUtFsNrt3vO1Ljd5Qt3gkNWnYLA8QkCMnBu7NfgUZzo=; b=xsxHflCEYuKHpe+P90PtwG48vxbQ6VmdjHRFe9TlC01qbtaXrIqCQ2uH7FYgShX+iRkb9U 5eTQL06SbTUw70DQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="hh/ghw2b"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=+Ga0DzMA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1787840268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gUtFsNrt3vO1Ljd5Qt3gkNWnYLA8QkCMnBu7NfgUZzo=; b=hh/ghw2bVjuV07m85C5xHL5+3gNVuIgynPmIe471Jcnhco9+u2Rq+n/j3Ra7C3JthvNiOL jOLuf21KRhdhQCi4ecBd0OhPKSBwyhoAoGLc1m3gq30GZ836XpCgsKt50PRTKkbE46qIgH E4VCrma77iHmMmnueWeIsI6WtDW7IAI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1787840268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gUtFsNrt3vO1Ljd5Qt3gkNWnYLA8QkCMnBu7NfgUZzo=; b=+Ga0DzMALYvprn1k0jJuwVumamDAZde+Kq3MFRniRlERPMmwkUl5JD9AdQoB8YENOVoBlZ JIa3OPwIxx1bFyBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DBF0D1352C; Thu, 27 Aug 2026 14:17:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ArwhNAtHkGq+HwAAD6G6ig (envelope-from ); Thu, 27 Aug 2026 14:17:47 +0000 Message-ID: <8c8a38de-5db7-4857-95d1-4abf2a010d54@suse.de> Date: Thu, 27 Aug 2026 16:17:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Check record types for compatibility in ada_type_match To: Tom Tromey , gdb-patches@sourceware.org References: <20260826201312.1120857-1-tromey@adacore.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20260826201312.1120857-1-tromey@adacore.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: 115361FB1B X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,gnu.org:url]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.de:+] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 8/26/26 10:13 PM, Tom Tromey wrote: > While investigating some gdb test suite failures when run against > gnat-llvm, I found this oddity in operator_call.exp: > > (gdb) print p < p > Multiple matches for "<" > [0] cancel > [1] system.dwarf_lines."<" (system.dwarf_lines.search_entry; system.dwarf_lines.search_entry) return boolean at s-dwalin.adb:265 > [2] twovecs."<" (twovecs.twovec; twovecs.twovec) return boolean at twovecs.adb:61 > > While operator_call.exp generally doesn't work yet with gnat-llvm, > this particular failure seemed wrong, because the types here aren't > even remotely related or compatible -- that is, this call should not > be ambiguous. > > Looking into this, I found that ada_type_match assumes that all record > types are identical. > > I think gdb can do a bit better than this, without trying to implement > full Ada overload resolution (which IIUC would require type > inferencing as well). > > In particular we can at least filter out the matches that are wholly > unsuitable. That is what this patch does. Hi Tom, this sounds like a good idea to me. I have just one question below. > --- > gdb/ada-lang.c | 58 ++++++++++++++- > gdb/testsuite/gdb.ada/record-overloads.exp | 70 +++++++++++++++++++ > .../gdb.ada/record-overloads/pck.adb | 43 ++++++++++++ > .../gdb.ada/record-overloads/pck.ads | 50 +++++++++++++ > .../gdb.ada/record-overloads/prog.adb | 32 +++++++++ > 5 files changed, 252 insertions(+), 1 deletion(-) > create mode 100644 gdb/testsuite/gdb.ada/record-overloads.exp > create mode 100644 gdb/testsuite/gdb.ada/record-overloads/pck.adb > create mode 100644 gdb/testsuite/gdb.ada/record-overloads/pck.ads > create mode 100644 gdb/testsuite/gdb.ada/record-overloads/prog.adb > > diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c > index 174e04af04c..f1aa13fff97 100644 > --- a/gdb/ada-lang.c > +++ b/gdb/ada-lang.c > @@ -4029,6 +4029,57 @@ ada_type_match_arrays (struct type *ftype, struct type *atype) > return ada_type_match (f_elt_type, a_elt_type); > } > > +/* Helper for ada_type_match that checks that two record types are > + compatible. As with that function, FTYPE is the formal type and > + ATYPE is the actual type. > + > + Note that it is ok if this function is not precise, as long as > + there aren't too many false negatives. That is, it's better to > + return 'true', because that will result in a menu being presented > + to the user. */ > + I don't fully understand the reasoning here. AFAIU, if there is only one match, no menu will be presented. In that case, is returning true still a conservative choice? Thanks, - Tom > +static bool > +ada_type_match_records (type *ftype, type *atype) > +{ > + /* In the case of tagged types, we look through the parent types; > + hence the loop. */ > + while (atype != nullptr) > + { > + if (ftype == atype) > + return true; > + > + /* Note that the formal type might be dynamic in some way. So, > + the checks we can do easily are fairly limited. However, in > + Ada simply checking the name should be sufficient, because > + Ada doesn't allow anonymous record types; nor does it allow > + two record types with the same name. And, if this is somehow > + violated (through shared library shenanigans or something), > + then it's fine to conservatively return 'true'. Note we use > + the safe name here, because although Ada doesn't allow > + anonymous types, with a little effort the user could arrange > + for any type as the actual type. */ > + if (streq (ftype->safe_name (), atype->safe_name ())) > + return true; > + > + /* Currently, gdb does not implement dispatching calls, and > + class-wide types aren't well-represented in the DWARF anyway. > + So as a heuristic, return true if the formal type is a parent > + of the actual type. This works out OK because gdb finds the > + true runtime type of the actual parameter. > + > + This could be improved by further examining the overload set > + for a best match. However this isn't done today, which is > + why the heuristic is needed. */ > + if (!ada_is_tagged_type (atype, false)) > + break; > + > + /* If this returns nullptr, the loop will stop. */ > + atype = ada_parent_type (atype); > + } > + > + return false; > +} > + > /* Return non-zero if formal type FTYPE matches actual type ATYPE. > The term "match" here is rather loose. The match is heuristic and > liberal -- while it tries to reject matches that are obviously > @@ -4046,6 +4097,10 @@ ada_type_match (struct type *ftype, struct type *atype) > if (atype->code () == TYPE_CODE_REF) > atype = ada_check_typedef (atype->target_type ()); > > + /* Also remove aligner types. */ > + ftype = ada_aligned_type (ftype); > + atype = ada_aligned_type (atype); > + > switch (ftype->code ()) > { > default: > @@ -4074,7 +4129,8 @@ ada_type_match (struct type *ftype, struct type *atype) > case TYPE_CODE_STRUCT: > if (!ada_is_array_descriptor_type (ftype)) > return (atype->code () == TYPE_CODE_STRUCT > - && !ada_is_array_descriptor_type (atype)); > + && !ada_is_array_descriptor_type (atype) > + && ada_type_match_records (ftype, atype)); > > [[fallthrough]]; > case TYPE_CODE_ARRAY: > diff --git a/gdb/testsuite/gdb.ada/record-overloads.exp b/gdb/testsuite/gdb.ada/record-overloads.exp > new file mode 100644 > index 00000000000..05318cedd30 > --- /dev/null > +++ b/gdb/testsuite/gdb.ada/record-overloads.exp > @@ -0,0 +1,70 @@ > +# Copyright 2026 Free Software Foundation, Inc. > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +load_lib "ada.exp" > + > +require allow_ada_tests > + > +standard_ada_testfile prog > + > +foreach_gnat_encoding scenario flags {all minimal} { > + lappend flags debug > + > + if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" \ > + executable $flags] != ""} { > + return > + } > + > + clean_restart ${testfile}-${scenario} > + > + set bp_location [gdb_get_line_number "START" ${testdir}/prog.adb] > + runto "prog.adb:$bp_location" > + > + gdb_test "print oload(r1)" [quotemeta {@DECIMAL = 0}] > + gdb_test "print oload(r2)" [quotemeta {@DECIMAL = 1}] > + > + # This one is not ambiguous. > + gdb_test "print oload(rb)" [quotemeta {@DECIMAL = 2}] > + > + # Neither is this one, because gdb can see that RCB's runtime type > + # is Rec_Base. > + gdb_test "print oload(rcb)" [quotemeta {@DECIMAL = 2}] > + > + gdb_test "print oload(rcf)" [quotemeta {@DECIMAL = 4}] > + > + proc test_menu {var} { > + set menu [multi_line "Multiple matches for oload" \ > + "\\\[0\\\] cancel" \ > + "\\\[1\\\] pck.oload (.*rec_base).*" \ > + "\\\[2\\\] pck.oload (.*rec_derived).*" \ > + "> $"] > + gdb_test_multiple "print oload($var)" "menu for $var" { > + -re "$menu" { > + pass "$gdb_test_name" > + } > + default { > + fail "$gdb_test_name" > + } > + } > + # Cancel the call. > + gdb_test 0 cancelled "cancel call for $var" > + } > + > + # These should not be ambiguous, but currently are: RD because gdb > + # can't tell the difference between a type and a class-wide type; > + # and RCD because gdb does not implement dispatching. > + test_menu rd > + test_menu rcd > +} > diff --git a/gdb/testsuite/gdb.ada/record-overloads/pck.adb b/gdb/testsuite/gdb.ada/record-overloads/pck.adb > new file mode 100644 > index 00000000000..e4cad65d8b2 > --- /dev/null > +++ b/gdb/testsuite/gdb.ada/record-overloads/pck.adb > @@ -0,0 +1,43 @@ > +-- Copyright 2026 Free Software Foundation, Inc. > +-- > +-- This program is free software; you can redistribute it and/or modify > +-- it under the terms of the GNU General Public License as published by > +-- the Free Software Foundation; either version 3 of the License, or > +-- (at your option) any later version. > +-- > +-- This program is distributed in the hope that it will be useful, > +-- but WITHOUT ANY WARRANTY; without even the implied warranty of > +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +-- GNU General Public License for more details. > +-- > +-- You should have received a copy of the GNU General Public License > +-- along with this program. If not, see . > + > +package body Pck is > + > + function Oload (C : Rec_1) return Integer is > + begin > + return 0; > + end Oload; > + > + function Oload (C : Rec_2) return Integer is > + begin > + return 1; > + end Oload; > + > + function Oload (C : Rec_Base) return Integer is > + begin > + return 2; > + end Oload; > + > + function Oload (C : Rec_Derived) return Integer is > + begin > + return 3; > + end Oload; > + > + function Oload (C : Rec_Dyn) return Integer is > + begin > + return 4; > + end Oload; > + > +end Pck; > diff --git a/gdb/testsuite/gdb.ada/record-overloads/pck.ads b/gdb/testsuite/gdb.ada/record-overloads/pck.ads > new file mode 100644 > index 00000000000..2863637e008 > --- /dev/null > +++ b/gdb/testsuite/gdb.ada/record-overloads/pck.ads > @@ -0,0 +1,50 @@ > +-- Copyright 2026 Free Software Foundation, Inc. > +-- > +-- This program is free software; you can redistribute it and/or modify > +-- it under the terms of the GNU General Public License as published by > +-- the Free Software Foundation; either version 3 of the License, or > +-- (at your option) any later version. > +-- > +-- This program is distributed in the hope that it will be useful, > +-- but WITHOUT ANY WARRANTY; without even the implied warranty of > +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +-- GNU General Public License for more details. > +-- > +-- You should have received a copy of the GNU General Public License > +-- along with this program. If not, see . > + > +package Pck is > + > + type Rec_1 is record > + X : Integer; > + end record; > + > + type Rec_2 is record > + X : Integer; > + end record; > + > + function Oload (C : Rec_1) return Integer; > + function Oload (C : Rec_2) return Integer; > + > + type Rec_Base is tagged record > + X : Integer; > + end record; > + > + function Oload (C : Rec_Base) return Integer; > + > + type Rec_Derived is new Rec_Base with null record; > + > + function Oload (C : Rec_Derived) return Integer; > + > + type Rec_Dyn (Cond : Boolean := True) is record > + case Cond is > + when True => > + TV : Integer; > + when False => > + FV : Integer; > + end case; > + end record; > + > + function Oload (C : Rec_Dyn) return Integer; > + > +end Pck; > diff --git a/gdb/testsuite/gdb.ada/record-overloads/prog.adb b/gdb/testsuite/gdb.ada/record-overloads/prog.adb > new file mode 100644 > index 00000000000..2951845ccb0 > --- /dev/null > +++ b/gdb/testsuite/gdb.ada/record-overloads/prog.adb > @@ -0,0 +1,32 @@ > +-- Copyright 2026 Free Software Foundation, Inc. > +-- > +-- This program is free software; you can redistribute it and/or modify > +-- it under the terms of the GNU General Public License as published by > +-- the Free Software Foundation; either version 3 of the License, or > +-- (at your option) any later version. > +-- > +-- This program is distributed in the hope that it will be useful, > +-- but WITHOUT ANY WARRANTY; without even the implied warranty of > +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +-- GNU General Public License for more details. > +-- > +-- You should have received a copy of the GNU General Public License > +-- along with this program. If not, see . > + > +with Pck; use Pck; > + > +procedure Prog is > + > + R1 : Rec_1 := (X => 23); > + R2 : Rec_2 := (X => 23); > + RB : Rec_Base := (X => 23); > + RD : Rec_Derived := (X => 23); > + > + RCB : Rec_Base'Class := RB; > + RCD : Rec_Base'Class := RD; > + > + RCF : Rec_Dyn := (Cond => False, FV => 23); > + > +begin > + null; -- START > +end Prog; > > base-commit: 625a5c311e6df32aa28214d017c65303bb5d6451