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

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Mon Jun 11 09:19:00 GMT 2018


Author: pmderodat
Date: Mon Jun 11 09:19:02 2018
New Revision: 261422

URL: https://gcc.gnu.org/viewcvs?rev=261422&root=gcc&view=rev
Log:
[Ada] Missing predicate function body for derived type in nested package

This patch fixes a bug in the construction of predicate functions.  For a
derived type, we must ensure that the parent type is already frozen so that its
predicate function has been constructed already. This is necessary if the
parent is declared in a nested package and its own freeze point has not been
reached when the derived type is frozen by a local object declaration.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch13.adb (Build_Predicate_Functions): For a derived type, ensure
	that its parent is already frozen so that its predicate function, if
	any, has already been constructed.

gcc/testsuite/

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

Added:
    trunk/gcc/testsuite/gnat.dg/predicate1.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_ch13.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list