From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2D3EC3857001; Thu, 16 Nov 2023 17:43:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D3EC3857001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700156598; bh=BcVRtxNPqzyQt3nLDDdtIS+ZjNqNqabUWYuHIH9HMZc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IWBuscFxs960XEpUkmZFwoDgy1kXjZ/nwfyzZae9XxOPaF8BnL9dIUmHD1zOKEubA kkXlzH9IuQ5q9fn0rMei7J1USjJIe8rlY+uGMcCX8UlWn19AQ7R74u8A5GbPeCZQcJ 3AXa5Cw4S/Sr8bLzoWKkYOX2zID1QEuIMiHJiGFs= 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:17 +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 #6 from Eric Botcazou --- https://gcc.gnu.org/g:c5e1cb7e501350ea339db44ca5a33704d817a6fb commit r13-8075-gc5e1cb7e501350ea339db44ca5a33704d817a6fb 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.=