Go to file
Maroua Maalej 7d8cc2b6d1 [Ada] Update for Ownership rules for access types according to AI12-0240
The implementation of these Ownership rules for safe pointers and
automatic memory management is still a prototype at an experimental
stage.

To activate the checks, the code should be compiled with the debug flag
-gnatdF and the flag -gnatd.F for setting the context for formal
verification of SPARK.

These changes do not affect compilation.

2018-08-21  Maroua Maalej  <maalej@adacore.com>

gcc/ada/

	* sem_spark.adb (Check_Call_Statement): Check global and formal
	parameter permissions at call sites.
	(Check_Callable_Body): Assume permissions on globals and
	parameters depending on their modes then analyse the body
	operations.
	(Check_Declaration): Consider both deep (including elementary
	access) object declarations and normal variables. First check
	whether the deep object is of Ownership Aspec True or not, then,
	depending on its initialization, assign the appropriate state.
	Check related to non access type variables deal with
	initialization value permissions.
	(Check_Expression): Check nodes used in the expression being
	analyzed.
	(Check_Globals): Call by Check_Call_Statement to perform the
	check on globals.
	(Check_List): Call Check_Node on each element of the list.
	(Check_Loop_Statement): Check the Iteration_Scheme and loop
	statements.
	(Check_Node): Main traversal procedure to check safe pointer usage.
	(Check_Package_Body): Check subprogram's body.
	(Check_Param_In): Take a formal and an actual parameter and
	Check the permission of every in-mode parameter.
	(Check_Param_Out): Take a formal and an actual parameter and
	check the state of out-mode and in out-mode parameters.
	(Check_Statement): Check statements other than procedure call.
	(Get_Perm, Get_Perm_Or_Tree, Get_Perm_Tree): Find out the state
	related to the given name.
	(Is_Deep): Return True if an object is of access type or has
	subfields of access type.
	(Perm_Error, Perm_Error_Subprogram_End): Add an error message
	whenever the found state on the given name is different from the
	one expected (in the statement being analyzed).
	(Process_Path): Given an operation and a current state, call
	Perm_Error if there is any mismatch.
	(Return_Declarations, Return_Globals, Return_The_Global): Check
	the state of a given name at the end of the subprogram. These
	procedures may change depending on how we shall finally deal
	with globals and the rhs state in a move operation.
	(Set_Perm_Extensions, Set_Perm_Prefixes_Borrow,
	Set_Perm_Prefixes, Setup_Globals, Setup_Parameter_Or_Global,
	Setup_Parameters): Set up the new states to the given node and
	up and down the tree after an operation.
	(Has_Ownership_Aspect_True): This function may disappear later
	when the Ownership Aspect will be implemented in the FE.

From-SVN: r263727
2018-08-21 14:47:38 +00:00
config Add missing '|' as wrong patch was applied. 2018-07-05 14:28:01 -06:00
contrib C-SKY port: Configury 2018-08-17 15:00:25 -04:00
fixincludes inclhack.def (aix_unistd): New. 2018-07-23 16:51:50 -04:00
gcc [Ada] Update for Ownership rules for access types according to AI12-0240 2018-08-21 14:47:38 +00:00
gnattools Update copyright years. 2018-01-03 11:03:58 +01:00
gotools go/build, cmd/go: update to match recent changes to gc 2018-05-09 21:49:47 +00:00
include Add linker_output as prefix for LTO temps (PR lto/86548). 2018-07-26 12:13:14 +00:00
INSTALL
intl Require ngettext in test of system gettext implementation 2017-11-07 15:24:01 +10:30
libada re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
libatomic [ARM] Use __ARM_ARCH and __ARM_FEATURE_LDREX instead of __ARM_ARCH__ 2018-06-21 13:05:36 +02:00
libbacktrace libbacktrace: Suppress the default action-if-found for AC_CHECK_LIBS. 2018-08-05 20:24:59 +00:00
libcc1 PR c++/69560 - wrong alignof(double) on x86. 2018-04-23 16:49:38 -04:00
libcpp [CPP PATCH] node field bits 2018-08-20 17:45:42 +00:00
libdecnumber Add missing '|' as wrong patch was applied. 2018-07-05 14:28:01 -06:00
libffi backport: ffi.c (ffi_call_go, [...]): New functions. 2018-08-15 06:57:45 +00:00
libgcc libgcc: add crt{begin,end} for powerpc-wrs-vxworks target 2018-08-21 08:49:15 +00:00
libgfortran Include <sys/random.h> for getentropy on Solaris 2018-08-14 22:51:36 +00:00
libgo runtime: use poll rather than pollset for netpoll on AIX 2018-08-07 17:29:50 +00:00
libgomp [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-08-13 12:04:24 +00:00
libhsail-rt [BRIGFE] phsa-specific optimizations 2018-05-04 19:43:57 +00:00
libiberty [libiberty patch] PEX-unix forking 2018-08-21 00:01:50 +00:00
libitm Remove nfs bogon 2018-08-03 14:53:48 -06:00
libobjc Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
liboffloadmic re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
libquadmath Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libsanitizer Cherry-pick compiler-rt revision 338606 (PR sanitizer/86022). 2018-08-02 09:32:58 +00:00
libssp Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libstdc++-v3 * testsuite/18_support/new_nothrow.cc: XFAIL on AIX. 2018-08-21 10:03:16 -04:00
libvtv [testsuite] Add scan-ltrans-tree-dump 2018-05-02 12:16:32 +00:00
lto-plugin lto-plugin.c: (non_claimed_files): New static var. 2018-05-30 16:34:54 +00:00
maintainer-scripts re PR other/85622 (gcc-8.1.0/NEWS says it's not released yet) 2018-05-03 11:29:39 +02:00
zlib Allow building of the zlib component when the building takes place in the source directory. 2018-06-19 11:49:08 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog Update global reviewers list 2018-08-21 13:49:30 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess Update config.guess and config.sub 2018-07-06 05:57:35 +00:00
config.rpath
config.sub Update config.sub 2018-07-06 06:22:08 +00:00
configure Introduce @unless/@endunless and postbootstrap Makefile targets 2018-06-30 02:47:29 +00:00
configure.ac Introduce @unless/@endunless and postbootstrap Makefile targets 2018-06-30 02:47:29 +00:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4 libtool.m4: Sort output of 'find' to enable deterministic builds. 2018-07-05 13:13:45 -06:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh libtool.m4: Sort output of 'find' to enable deterministic builds. 2018-07-05 13:13:45 -06:00
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Update global reviewers list 2018-08-21 13:49:30 +00:00
Makefile.def Makefile.def (fortran): Add check-target-libgomp-fortran. 2018-06-18 22:01:58 +00:00
Makefile.in Introduce @unless/@endunless and postbootstrap Makefile targets 2018-06-30 02:47:29 +00:00
Makefile.tpl Introduce @unless/@endunless and postbootstrap Makefile targets 2018-06-30 02:47:29 +00:00
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
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.