r260933 - in /trunk/gcc: ada/ChangeLog ada/sem_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Wed May 30 08:57:00 GMT 2018


Author: pmderodat
Date: Wed May 30 08:57:21 2018
New Revision: 260933

URL: https://gcc.gnu.org/viewcvs?rev=260933&root=gcc&view=rev
Log:
[Ada] Spurious error on legal synchronized constituent

This patch corrects the predicate which determines whether an entity denotes a
synchronized object as per SPARK RM 9.1. to account for a case where the object
is not atomic, but its type is.

The patch also cleans up various atomic object-related predicates.

2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
	in a separate routine.
	(Is_Atomic_Object_Entity): New routine.
	(Is_Atomic_Prefix): Cleaned up.
	(Is_Synchronized_Object): Check that the object is atomic, or its type
	is atomic.
	(Object_Has_Atomic_Components): Removed.
	* sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
	(Is_Atomic_Object_Entity): New routine.

gcc/testsuite/

	* gnat.dg/synchronized1.adb, gnat.dg/synchronized1.ads: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/synchronized1.adb
    trunk/gcc/testsuite/gnat.dg/synchronized1.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_util.adb
    trunk/gcc/ada/sem_util.ads
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list