This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Author: pmderodat
Date: Tue Jul 17 08:03:49 2018
New Revision: 262767

URL: https://gcc.gnu.org/viewcvs?rev=262767&root=gcc&view=rev
Log:
[Ada] Fix handling of inherited discriminant constraints

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

gcc/ada/

	* sem_util.adb (Gather_Components): A discriminant of an ancestor may
	have been constrained by a later ancestor, so when looking for the
	value of that hidden discriminant we must examine the stored constraint
	of other ancestors than the immediate parent type.

gcc/testsuite/

	* gnat.dg/discr54.adb, gnat.dg/discr54_pkg.ads: New testcase.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]