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]

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


Author: pmderodat
Date: Tue May 22 13:23:51 2018
New Revision: 260521

URL: https://gcc.gnu.org/viewcvs?rev=260521&root=gcc&view=rev
Log:
[Ada] Crash with private types and renamed discriminants

This patch fixes a compiler abort on an object declaration whose type
is a private type with discriminants, and whose full view is a derived
type that renames some discriminant of its parent.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
	private, use the full view if available, because it may include renamed
	discriminants whose values are stored in the corresponding
	Stored_Constraint.

gcc/testsuite/

	* gnat.dg/discr49.adb, gnat.dg/discr49_rec1.adb,
	gnat.dg/discr49_rec1.ads, gnat.dg/discr49_rec2.adb,
	gnat.dg/discr49_rec2.ads: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/discr49.adb
    trunk/gcc/testsuite/gnat.dg/discr49_rec1.adb
    trunk/gcc/testsuite/gnat.dg/discr49_rec1.ads
    trunk/gcc/testsuite/gnat.dg/discr49_rec2.adb
    trunk/gcc/testsuite/gnat.dg/discr49_rec2.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_ch3.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]