public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/112781] [13/14 regression] internal error on function call returning extension of limited interface Date: Tue, 09 Jan 2024 10:07:32 +0000 [thread overview] Message-ID: <bug-112781-4-cJOfNSEOGr@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112781-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112781 --- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>: https://gcc.gnu.org/g:8f80b9f0904eb98b41913068ce7dc021c2f35ecc commit r14-7032-g8f80b9f0904eb98b41913068ce7dc021c2f35ecc Author: Eric Botcazou <ebotcazou@adacore.com> Date: Tue Jan 9 11:06:23 2024 +0100 Fix internal error on function call returning extension of limited interface The problem occurs when this function call is the expression of a return in a function returning the limited interface; in this peculiar case, there is a mismatch between the callee, which has BIP formals but is not a BIP call, and the caller, which is a BIP function, that is spotted by an assertion. This is fixed by restoring the semantics of Is_Build_In_Place_Function_Call, which returns again true only for calls to BIP functions, introducing the Is_Function_Call_With_BIP_Formals predicate, which also returns true for calls to functions with BIP formals that are not BIP functions, and moving down the assertion in Expand_Simple_Function_Return. gcc/ada/ PR ada/112781 * exp_ch6.ads (Is_Build_In_Place_Function): Adjust description. * exp_ch6.adb (Is_True_Build_In_Place_Function_Call): Delete. (Is_Function_Call_With_BIP_Formals): New predicate. (Is_Build_In_Place_Function_Call): Restore original semantics. (Expand_Call_Helper): Adjust conditions guarding the calls to Add_Dummy_Build_In_Place_Actuals to above renaming. (Expand_N_Extended_Return_Statement): Adjust to above renaming. (Expand_Simple_Function_Return): Likewise. Move the assertion to after the transformation into an extended return statement. (Make_Build_In_Place_Call_In_Allocator): Remove unreachable code. (Make_Build_In_Place_Call_In_Assignment): Likewise. gcc/testsuite/ * gnat.dg/bip_prim_func2.adb: New test. * gnat.dg/bip_prim_func2_pkg.ads, gnat.dg/bip_prim_func2_pkg.adb: New helper package.
next prev parent reply other threads:[~2024-01-09 10:07 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-30 12:27 [Bug ada/112781] New: [13?/14 regression] ICE in generic instantiation simon at pushface dot org 2023-11-30 13:57 ` [Bug ada/112781] " rguenth at gcc dot gnu.org 2023-12-04 17:24 ` [Bug ada/112781] [13/14 " ebotcazou at gcc dot gnu.org 2023-12-05 0:51 ` ebotcazou at gcc dot gnu.org 2023-12-05 11:39 ` [Bug ada/112781] [13/14 regression] internal error on function call returning extension of limited interface ebotcazou at gcc dot gnu.org 2024-01-09 9:49 ` cvs-commit at gcc dot gnu.org 2024-01-09 9:50 ` cvs-commit at gcc dot gnu.org 2024-01-09 10:07 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-09 10:14 ` cvs-commit at gcc dot gnu.org 2024-01-09 10:14 ` ebotcazou at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-112781-4-cJOfNSEOGr@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).