GCC modified for the FreeChainXenon project
Find a file
Eric Botcazou 8f80b9f090 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.
2024-01-09 11:06:23 +01:00
.github
c++tools Update copyright years. 2024-01-03 12:19:35 +01:00
config Daily bump. 2023-12-01 00:17:36 +00:00
contrib Daily bump. 2024-01-09 00:17:50 +00:00
fixincludes Daily bump. 2023-11-23 00:18:14 +00:00
gcc Fix internal error on function call returning extension of limited interface 2024-01-09 11:06:23 +01:00
gnattools Update Copyright year in ChangeLog files 2024-01-03 11:35:18 +01:00
gotools
include Update copyright years. 2024-01-03 12:19:35 +01:00
INSTALL
libada Update copyright years. 2024-01-03 12:19:35 +01:00
libatomic Update copyright years. 2024-01-03 12:19:35 +01:00
libbacktrace Update copyright years. 2024-01-05 08:54:28 +01:00
libcc1 Update copyright years. 2024-01-03 12:19:35 +01:00
libcody Update Copyright year in ChangeLog files 2024-01-03 11:35:18 +01:00
libcpp Daily bump. 2024-01-05 00:18:48 +00:00
libdecnumber Update copyright years. 2024-01-03 12:19:35 +01:00
libffi
libgcc Update copyright years. 2024-01-03 12:19:35 +01:00
libgfortran Daily bump. 2024-01-08 00:16:43 +00:00
libgm2 Daily bump. 2024-01-06 00:18:04 +00:00
libgo libgo: update configure.ac to upstream GCC 2023-11-30 13:23:53 -08:00
libgomp libgomp: Use absolute pathname to testsuite/flock [PR113192] 2024-01-09 09:54:06 +01:00
libgrust Daily bump. 2024-01-09 00:17:50 +00:00
libiberty Update copyright years. 2024-01-03 12:19:35 +01:00
libitm Daily bump. 2024-01-04 00:18:45 +00:00
libobjc Update copyright years. 2024-01-03 12:19:35 +01:00
libphobos Update copyright years. 2024-01-05 08:54:28 +01:00
libquadmath Daily bump. 2024-01-04 00:18:45 +00:00
libsanitizer Daily bump. 2024-01-03 00:17:41 +00:00
libssp Update copyright years. 2024-01-03 12:19:35 +01:00
libstdc++-v3 Daily bump. 2024-01-09 00:17:50 +00:00
libvtv Update copyright years. 2024-01-03 12:19:35 +01:00
lto-plugin Update copyright years. 2024-01-03 12:19:35 +01:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2024-01-09 00:17:50 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
configure.ac build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Build: fix error in fixinclude configure 2023-11-22 11:54:33 +01:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Update my email address 2024-01-08 18:52:09 +00:00
Makefile.def build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
Makefile.in build: Add libgrust as compilation modules 2023-12-14 13:58:57 +01:00
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
SECURITY.txt
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.