From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C84D3858435; Thu, 16 Nov 2023 17:43:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C84D3858435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700156621; bh=HO+9b2gi5GK6BuF7QuoFARshjHvsm0nR4/J66AaF8uA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cg4BmxRXxhyqct+FqWa5p0hRZP47W518BomnfmFbuMUYEs0SQOazW4yL7MgS/ANdp fnjBAEKqNfcYN9RoQeURcevG8Lc9Dhkh4SkaUdsJWo+IkgJ4+EeMLTgvjuHjtRaC8E cT6bKoYYxdOq12VqU9P97dzDBFkC0ZMxWgmecaqI= From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/109881] internal error on function returning dynamically-sized type Date: Thu, 16 Nov 2023 17:43:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109881 --- Comment #7 from Eric Botcazou --- https://gcc.gnu.org/g:1865bca25e1d275853aed9f2780a300c6db8fd1c commit r12-9985-g1865bca25e1d275853aed9f2780a300c6db8fd1c Author: Eric Botcazou Date: Thu Nov 16 18:36:44 2023 +0100 Fix internal error on function returning dynamically-sized type This is a tree sharing issue for the internal return type synthesized f= or a function returning a dynamically-sized type and taking an Out or In/O= ut parameter passed by copy. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Also create= a TYPE_DECL for the return type built for the CI/CO mechanism. gcc/testsuite/ * gnat.dg/varsize4.ads, gnat.dg/varsize4.adb: New test. * gnat.dg/varsize4_pkg.ads: New helper.=