GCC modified for the FreeChainXenon project
Find a file
Piotr Trojanek 214b1cb8a8 ada: Deconstruct Safe_To_Capture_In_Parameter_Value
Recently routine Safe_To_Capture_Value was adapted, so that various data
properties like validity/nullness/values are tracked also for
in-parameters. Now a similar routine Safe_To_Capture_In_Parameter_Value,
which was only used to track data nullness, is redundant, so this patch
deconstructs it.

Also the removed routine had at least few problems and limitations, for
example:

1) it only worked for functions and procedures, but not for protected
entries and task types (whose discriminants work very much like
in-parameters)

2) it only worked for subprogram bodies with no spec, because of this
dubious check (here simplified):

   if Nkind (Parent (Parent (Current_Scope))) /= N_Subprogram_Body then
       return False;

3) it only recognized references within short-circuit operators as
certainly evaluated if they were directly their left hand expression,
e.g.:

   X.all and then ...

but not when they were certainly evaluated as part of a bigger
expression on the left hand side, e.g.:

   (X.all > 0) and then ...

4) it categorizes parameters with 'Unrestricted_Access attribute as safe
to capture, which is not necessarily wrong, but risky (because the
object becomes aliased).

Routine Safe_To_Capture_Value, which is kept by this patch, seems to
behave better in all those situations, though it has its own problems as
well and ideally should be further scrutinized.

gcc/ada/

	* checks.adb (Safe_To_Capture_In_Parameter_Value): Remove.
	* sem_util.adb (Safe_To_Capture_Value): Stop search at the current
	body.
2022-11-07 09:36:33 +01:00
c++tools
config Daily bump. 2022-10-20 00:17:52 +00:00
contrib Manually add ChangeLog entries from r13-3652-ge4cba49413ca429dc82f6aa2e88129ecb3fdd943 2022-11-06 12:12:47 +01:00
fixincludes Daily bump. 2022-10-08 00:17:29 +00:00
gcc ada: Deconstruct Safe_To_Capture_In_Parameter_Value 2022-11-07 09:36:33 +01:00
gnattools Daily bump. 2022-09-01 00:17:39 +00:00
gotools Daily bump. 2022-08-31 00:16:45 +00:00
include Manually add ChangeLog entries from r13-3652-ge4cba49413ca429dc82f6aa2e88129ecb3fdd943 2022-11-06 12:12:47 +01:00
INSTALL
intl
libada Daily bump. 2022-08-26 00:16:21 +00:00
libatomic Daily bump. 2022-10-20 00:17:52 +00:00
libbacktrace Daily bump. 2022-10-13 00:17:37 +00:00
libcc1 Daily bump. 2022-11-02 00:17:38 +00:00
libcody Daily bump. 2022-06-04 00:16:27 +00:00
libcpp Daily bump. 2022-11-06 11:05:22 +00:00
libdecnumber Daily bump. 2022-10-08 00:17:29 +00:00
libffi Daily bump. 2022-10-13 00:17:37 +00:00
libgcc Daily bump. 2022-11-06 11:05:22 +00:00
libgfortran Daily bump. 2022-10-13 00:17:37 +00:00
libgo runtime: use _libgo_off_t_type when calling C mmap 2022-10-27 17:12:57 -07:00
libgomp Manually add ChangeLog entries from r13-3652-ge4cba49413ca429dc82f6aa2e88129ecb3fdd943 2022-11-06 12:12:47 +01:00
libiberty Daily bump. 2022-10-19 00:19:08 +00:00
libitm Daily bump. 2022-11-01 00:19:02 +00:00
libobjc Daily bump. 2022-10-21 00:17:52 +00:00
libphobos Daily bump. 2022-11-06 11:05:22 +00:00
libquadmath Daily bump. 2022-10-13 00:17:37 +00:00
libsanitizer Daily bump. 2022-10-20 00:17:52 +00:00
libssp Daily bump. 2022-10-13 00:17:37 +00:00
libstdc++-v3 Daily bump. 2022-11-07 00:16:42 +00:00
libvtv Daily bump. 2022-11-01 00:19:02 +00:00
lto-plugin Daily bump. 2022-10-13 00:17:37 +00:00
maintainer-scripts Daily bump. 2022-07-29 00:16:21 +00:00
zlib Daily bump. 2022-10-13 00:17:37 +00:00
.dir-locals.el
.gitattributes
.gitignore .gitignore: do not ignore config.h 2022-07-19 17:07:04 +03:00
ABOUT-NLS
ar-lib
ChangeLog Manually add ChangeLog entries from r13-3652-ge4cba49413ca429dc82f6aa2e88129ecb3fdd943 2022-11-06 12:12:47 +01:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Remove support for Intel MIC offloading 2022-11-04 10:51:01 +01:00
configure.ac Remove support for Intel MIC offloading 2022-11-04 10:51:01 +01:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS Update email address 2022-10-31 11:15:45 +00:00
Makefile.def Remove support for Intel MIC offloading 2022-11-04 10:51:01 +01:00
Makefile.in Remove support for Intel MIC offloading 2022-11-04 10:51:01 +01:00
Makefile.tpl Makefile.def: drop remnants of unused libelf 2022-08-18 09:37:09 +01:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
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.