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

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Tue Jul 17 08:09:00 GMT 2018


Author: pmderodat
Date: Tue Jul 17 08:09:14 2018
New Revision: 262788

URL: https://gcc.gnu.org/viewcvs?rev=262788&root=gcc&view=rev
Log:
[Ada] Missing check on illegal equality operation in subprogram

In Ada2012 it is illegal to declare an equality operation on an untagged
type when the operation is primitive and the type is already frozem (see
RM 4.5.2 (9.8)). previously the test to detect this illegality only examined
declarations within a package. This patch covers the case where type and
operation are both declared within a subprogram body.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch6.adb (Check_Untagged_Equality): Extend check to operations
	declared in the same scope as the operand type, when that scope is a
	procedure.

gcc/testsuite/

	* gnat.dg/equal3.adb: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/equal3.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_ch6.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list