GCC modified for the FreeChainXenon project
![]() 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. |
||
---|---|---|
c++tools | ||
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcody | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libiberty | ||
libitm | ||
libobjc | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
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.